3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a[1] = 'lolol'; $a[2] = '1l1l1l'; $a[3] = '<p>dasdsa</p>'; $a[4] = 'assa"".**&'; function protect(){ addslashes($a); array_map('strip_tags',$a); } protect($a); var_dump($a); return $a;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $a in /in/cBXQ6 on line 9 Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /in/cBXQ6 on line 9 Warning: Undefined variable $a in /in/cBXQ6 on line 10 Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /in/cBXQ6:10 Stack trace: #0 /in/cBXQ6(10): array_map('strip_tags', NULL) #1 /in/cBXQ6(13): protect(Array) #2 {main} thrown in /in/cBXQ6 on line 10
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:
39.21 ms | 402 KiB | 8 Q