|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-10 16:51 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
Description: ------------ I have used passphru to execute a external code. I cannot work with the string that I get back from the passphru. I have tryed to use the 'explode' and 'split' functions to get a Array from the string that i got after a passthru. I always get a array with a member only (all the string). ------------------------------------------------------- Shell-script file: lala.bash ------------- #!/bin/bash echo lala@lele ------------- BAD php code: ------------- $array = explode ("@", pasthru("lala.bash") ); ------------- $array will have only a member, just "lala@lele" and not 2, one with lala, and other with lele All works with exec. Anyway think about a multi-line return from a execution. Reproduce code: --------------- $array = explode ("@", pasthru("lala.bash") ); Expected result: ---------------- Array( 0=> 'lala' , 1=> 'lele') Actual result: -------------- Array( 0=> 'lala@lele')