3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myArrayContainer{ function myArrayFunction(){ return $myArray = array( "Name" => "John", "LastName" => "Smith", ); } } $myShitz = new myArrayContainer(); $myShit = $myShitz->myArrayFunction(); $myShitClass = new myArrayClass($myShit); class myArrayClass { function __construct($myArray){ echo ("Printing my Array as Recieved"); echo ("</br>"); print_r(array_values($myArray)); $myProcessClass = new myProcess($myArray); } } class myProcess { function __construct($sameArray){ $mySentence = serialize($sameArray); print_r($mySentence); $placements = array ("John" => "Jose", "Smith" => "Tobar"); preg_replace("/:(\w+)/e", $placements[$1], $mySentence); } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.280.0190.07012.39
5.4.270.0090.06312.39
5.4.260.0130.06712.39
5.4.250.0080.05712.39
5.4.240.0100.05212.39
5.4.230.0110.05112.38
5.4.220.0120.05912.38
5.4.210.0110.05512.38
5.4.200.0150.06912.38
5.4.190.0150.05612.38
5.4.180.0170.07812.38
5.4.170.0210.06312.39
5.4.160.0120.06212.38
5.4.150.0160.05112.38
5.4.140.0090.06512.07
5.4.130.0140.04812.05
5.4.120.0100.04712.02
5.4.110.0110.05912.01
5.4.100.0110.04512.01
5.4.90.0090.05112.01
5.4.80.0110.04812.01
5.4.70.0140.05412.01
5.4.60.0120.04012.01
5.4.50.0100.05612.01
5.4.40.0070.04712.00
5.4.30.0090.04812.00
5.4.20.0120.05311.99
5.4.10.0120.07211.99
5.4.00.0140.06711.48
5.3.280.0110.06012.71
5.3.270.0100.04212.73
5.3.260.0070.04212.71
5.3.250.0080.03912.72
5.3.240.0100.03712.72
5.3.230.0100.06712.71
5.3.220.0080.04312.68
5.3.210.0100.04712.68
5.3.200.0110.04812.68
5.3.190.0070.04012.68
5.3.180.0090.05212.67
5.3.170.0120.05212.67
5.3.160.0130.04312.68
5.3.150.0040.04212.67
5.3.140.0070.03712.66
5.3.130.0090.04412.66
5.3.120.0110.05112.65
5.3.110.0190.04812.66
5.3.100.0100.04812.12
5.3.90.0120.06112.09
5.3.80.0120.05412.07
5.3.70.0110.05012.07
5.3.60.0110.04312.07
5.3.50.0070.03912.01
5.3.40.0140.06512.01
5.3.30.0110.05011.96
5.3.20.0020.04411.76
5.3.10.0230.05611.71
5.3.00.0090.03611.70

preferences:
131.24 ms | 1394 KiB | 7 Q