3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} $int = 111; $float = 1.23; $bool_true = true; $bool_false = false; $array = ['aaa']; $obj = new A; var_dump(preg_match('/111/', $int)); var_dump(preg_match('/1.23/', $float)); var_dump(preg_match('/1/', $bool_true)); var_dump(preg_match('/^$/', $bool_false)); var_dump(preg_match('/Array/', $array)); var_dump(preg_match('/A/', $obj));
Output for git.master, git.master_jit, rfc.property-hooks
int(1) int(1) int(1) int(1) Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /in/HVBhj:16 Stack trace: #0 /in/HVBhj(16): preg_match('/Array/', Array) #1 {main} thrown in /in/HVBhj on line 16
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:
47.11 ms | 401 KiB | 8 Q