|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2010-02-03 12:12 UTC] val@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 16:00:01 2025 UTC | 
Description: ------------ Compiling a php file with a shebang causes no executable php file. Reproduce code: --------------- compile code: $f = fopen('target.php', "w"); bcompiler_write_header($f); bcompiler_write_file($f, 'source.php'); bcompiler_write_footer($f); fclose($f); file: #!/usr/bin/php <?php echo 'Hello World' . "\n"; ?> Expected result: ---------------- $ ./target.php Hello World Actual result: -------------- $ ./target.php ./target.php: Exec format error. Binary file not executable. Exit 1 $ php target.php #!/usr/bin/php Hello World