3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Printable { public function __toString(); } class MyPrintableClass implements Printable { public $myNumericProperty; public function __construct() { $this->myNumericProperty = 10; } public function __toString() { return 'My numeric property is ' . $this->myNumericProperty; } } function printSomething(Printable & string $aString) { echo $aString; } printSomething(new MyPrintableClass()); printSomething("You can't print a real sting");

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.6.130.0100.07718.23
5.6.120.0000.05021.03
5.6.110.0000.09721.15
5.6.100.0170.07021.02
5.6.90.0170.07721.05
5.6.80.0070.06320.49
5.5.290.0070.07717.95
5.5.280.0030.05020.81
5.5.270.0100.05020.84
5.5.260.0100.07020.94
5.5.250.0170.06020.50
5.5.240.0030.07720.13
5.4.450.0270.06719.47
5.4.440.0430.06319.48
5.4.430.0500.05319.46
5.4.420.0530.05019.47
5.4.410.0370.06019.42
5.4.400.0500.05019.11
5.4.390.0430.05018.97
5.4.380.0170.04319.14
5.4.370.0270.05319.16
5.4.360.0300.05719.25
5.4.350.0330.05319.24
5.4.340.0300.05719.26
5.4.320.0530.04718.88
5.4.310.0430.04719.36
5.4.300.0370.05719.04
5.4.290.0330.05319.05
5.4.280.0230.06319.16
5.4.270.0370.05719.14
5.4.260.0470.04319.38
5.4.250.0270.06319.00
5.4.240.0400.05018.83
5.4.230.0400.05319.25
5.4.220.0670.04019.13
5.4.210.0400.05018.97
5.4.200.0370.05319.14
5.4.190.0470.04719.14
5.4.180.0330.05719.29
5.4.170.0430.04719.29
5.4.160.0470.06719.34
5.4.150.0500.05318.98
5.4.140.0370.05316.78
5.4.130.0430.04316.46
5.4.120.0430.04716.41
5.4.110.0430.04716.33
5.4.100.0470.04716.65
5.4.90.0400.05716.57
5.4.80.0400.05316.65
5.4.70.0270.06716.63
5.4.60.0030.03016.48
5.4.50.0100.06716.51
5.4.40.0130.04716.19
5.4.30.0230.06716.48
5.4.20.0300.02316.43

preferences:
142.1 ms | 1394 KiB | 7 Q