3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/(\w+) (\w+)/', function($matches) { var_dump($matches); return strtoupper($matches);},'rodrigo capile rodrigo capile rodrigo capile');
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> string(14) "rodrigo capile" [1]=> string(7) "rodrigo" [2]=> string(6) "capile" } Fatal error: Uncaught TypeError: strtoupper(): Argument #1 ($string) must be of type string, array given in /in/vKr0L:4 Stack trace: #0 /in/vKr0L(4): strtoupper(Array) #1 [internal function]: {closure}(Array) #2 /in/vKr0L(2): preg_replace_callback('/(\\w+) (\\w+)/', Object(Closure), 'rodrigo capile ...') #3 {main} thrown in /in/vKr0L on line 4
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:
44.41 ms | 401 KiB | 8 Q