3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count= 1024; $in= ""; $script= $out= "function something (a,b,c) { do(this); do(that); alert('guruguru'); } "; while (strlen($out)!=0 && strlen($out)!=strlen($in)) { echo "count: ".$count."\n"; $in= "<html>\n<head>\n<script type=whatever>".str_repeat($script, $count)."</script>\n</head>\n</html>"; printf("%7d bytes original.\n", strlen($in)); $out= preg_replace('!<script\b[^>]*>.*</script>!sU', '', $in); printf("%7d bytes after script-removal.\n\n", strlen($out)); $count*= 2; }
Output for git.master, git.master_jit, rfc.property-hooks
count: 1024 71741 bytes original. 30 bytes after script-removal. count: 2048 143421 bytes original. 30 bytes after script-removal. count: 4096 286781 bytes original. 30 bytes after script-removal. count: 8192 573501 bytes original. 30 bytes after script-removal. count: 16384 1146941 bytes original. Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/fjL9Q on line 13 0 bytes after script-removal. Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/fjL9Q 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:
171.96 ms | 407 KiB | 5 Q