3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stringFactory($len){ return "feed SET status_msg = '".str_repeat('a', $len)."\n[...]' WHERE feedname = 'some'"; } function stringCheck($len){ $str = stringFactory($len); var_dump(strlen($str)); $str = preg_replace("/'(?:[^'\\\\]|\\\\.)*'/", '?', $str); var_dump($str); echo PHP_EOL; } stringCheck(5); stringCheck(50); stringCheck(500); stringCheck(5000); stringCheck(50000); stringCheck(500000);
Output for git.master_jit, git.master
int(59) string(42) "feed SET status_msg = ? WHERE feedname = ?" int(104) string(42) "feed SET status_msg = ? WHERE feedname = ?" int(554) string(42) "feed SET status_msg = ? WHERE feedname = ?" int(5054) string(42) "feed SET status_msg = ? WHERE feedname = ?" int(50054) NULL int(500054) NULL

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:
45.04 ms | 406 KiB | 5 Q