3v4l.org

run code in 200+ PHP versions simultaneously
<?php function randomNumberSequence($requiredLength = 7, $highestDigit = 8) { $sequence = ''; for ($i = 0; $i < $requiredLength; ++$i) { $sequence .= mt_rand(0, $highestDigit); } return $sequence; } $numberPrefixes = ['0812', '0813', '0814', '0815', '0816', '0817', '0818', '0819', '0909', '0908']; for ($i = 0; $i < 21; ++$i) { echo $numberPrefixes[array_rand($numberPrefixes)] , randomNumberSequence() , "\n"; }
based on vbUkS

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
08168543650 08178727557 08195718610 08188156765 08160484284 08152028433 08136160636 09095277850 09092366268 08164226826 08130661328 08174861131 08146182225 08152238627 08156442564 08153472587 08141684264 08156842552 09090556638 09096363757 08165448251
Output for branch php-master+opcache
08196508084 09084446773 08152820657 08188625271 08195841817 08192878543 08124017431 08184371440 08141826320 08164457334 08156858100 08167031405 08133645344 08196812307 08126774788 08180201260 08193775225 08137057558 08180213254 08164541081 08168124068
Output for branch php-master+jit
08127130534 09080208138 08185855535 08123687550 08192670208 08195643150 08125004874 08144217415 08137135644 08124200342 08182601818 08173134057 09087238344 09095858321 08163430015 08178363858 09095566408 08130108014 08191581246 08142521584 08141232815
Output for Typed properties v2
08148858777 08154571602 08138768866 08198107556 08134876728 08192834035 08176345122 08186872655 08195180432 08197084077 08135228048 09091065048 08140666716 08131352571 09087866202 08187200453 08168867737 08162310862 08157715465 08184234132 08168333036
Output for Arrow functions
/bin/php-rfc-arrow_functions: error while loading shared libraries: libicui18n.so.58: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for Object typehint
/bin/php-rfc-object-typehint: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for Array change keys
/bin/php-rfc-array_change_keys: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for Lexical anon
/bin/php-rfc-lexical-anon: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
Process exited with code 127.

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