3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($arg){ var_dump($arg); $path = '../dir/'.$arg; echo $arg; $results = scandir($arg); } preg_replace('/a/', foo("$1"), 'a');
Output for git.master, git.master_jit, rfc.property-hooks
string(2) "$1" $1 Warning: scandir(): open_basedir restriction in effect. File($1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kASOi on line 6 Warning: scandir($1): Failed to open directory: Operation not permitted in /in/kASOi on line 6 Warning: scandir(): (errno 1): Operation not permitted in /in/kASOi on line 6 Deprecated: preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated in /in/kASOi on line 8

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
74.79 ms | 402 KiB | 8 Q