3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_match('/(\w+) (\w+)/', 'rodrigo capile', $m); var_dump($m); echo preg_match('/(\w+) (\w+)/', 'rodrigo capile rodrigo capile rodrigo capile', $m); var_dump($m); echo preg_match_all('/(\w+) (\w+)/', 'rodrigo capile rodrigo capile rodrigo capile', $m); var_dump($m); echo preg_replace_callback('/(\w+) (\w+)/', function($matches) {return strtoupper(matches);},'rodrigo capile rodrigo capile rodrigo capile');
Output for git.master, git.master_jit, rfc.property-hooks
1array(3) { [0]=> string(14) "rodrigo capile" [1]=> string(7) "rodrigo" [2]=> string(6) "capile" } 1array(3) { [0]=> string(14) "rodrigo capile" [1]=> string(7) "rodrigo" [2]=> string(6) "capile" } 3array(3) { [0]=> array(3) { [0]=> string(14) "rodrigo capile" [1]=> string(14) "rodrigo capile" [2]=> string(14) "rodrigo capile" } [1]=> array(3) { [0]=> string(7) "rodrigo" [1]=> string(7) "rodrigo" [2]=> string(7) "rodrigo" } [2]=> array(3) { [0]=> string(6) "capile" [1]=> string(6) "capile" [2]=> string(6) "capile" } } Fatal error: Uncaught Error: Undefined constant "matches" in /in/RCZ22:12 Stack trace: #0 [internal function]: {closure}(Array) #1 /in/RCZ22(12): preg_replace_callback('/(\\w+) (\\w+)/', Object(Closure), 'rodrigo capile ...') #2 {main} thrown in /in/RCZ22 on line 12
Process exited with code 255.

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:
40.75 ms | 402 KiB | 8 Q