3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function baz() { echo "Worked!"; } } $foo = 'bam'; $bam = ['bar' => new TestClass()]; $output = $$foo; var_dump($$foo); // Correctly reads this var_dump({$$foo}['bar']); // Change $$foo to $output $$foo['bar']->baz(); // function getResult() { // return "string"; // } // echo getResult(){0};

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)
7.0.20.0300.07320.28
7.0.10.0030.07020.17
7.0.00.0030.09320.22
5.6.160.0070.03720.52
5.6.150.0070.08018.16
5.6.140.0100.07718.23
5.6.130.0100.04018.19
5.6.120.0030.08720.97
5.6.110.0030.04321.09
5.6.100.0070.04321.09
5.6.90.0030.07320.88
5.6.80.0030.08320.29
5.5.300.0070.04017.98
5.5.290.0070.06718.00
5.5.280.0130.06720.77
5.5.270.0030.04020.68
5.5.260.0100.08020.88
5.5.250.0170.07320.68
5.5.240.0230.07720.19

preferences:
145.39 ms | 1394 KiB | 7 Q