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 $aString) { echo $aString; } printSomething(new MyPrintableClass()); printSomething("aString");

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)
8.3.70.0040.01117.00
8.3.60.0070.00716.63
8.3.50.0160.00521.20
8.3.40.0180.00018.85
8.3.30.0130.01018.97
8.3.20.0000.00820.34
8.3.10.0080.00023.41
8.3.00.0050.00319.81
8.2.180.0080.00818.41
8.2.170.0170.00022.96
8.2.160.0170.00020.39
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00319.48
8.2.110.0050.00520.94
8.2.100.0100.00017.91
8.2.90.0030.00617.97
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0040.00419.28
8.2.30.0040.00419.75
8.2.20.0070.00017.61
8.2.10.0040.00417.99
8.2.00.0050.00318.11
8.1.280.0070.01125.92
8.1.270.0040.00420.24
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00422.65
8.1.230.0070.00420.97
8.1.220.0060.00317.74
8.1.210.0050.00318.91
8.1.200.0050.00517.35
8.1.190.0000.00917.23
8.1.180.0030.00518.10
8.1.170.0000.00918.48
8.1.160.0000.00823.90
8.1.150.0030.00519.00
8.1.140.0030.00517.33
8.1.130.0000.00717.71
8.1.120.0000.00717.50
8.1.110.0040.00417.50
8.1.100.0030.00717.34
8.1.90.0040.00417.46
8.1.80.0040.00417.46
8.1.70.0040.00417.42
8.1.60.0040.00417.57
8.1.50.0030.00617.54
8.1.40.0040.00417.55
8.1.30.0040.00417.55
8.1.20.0000.00717.64
8.1.10.0040.00417.54
8.1.00.0060.00317.54
8.0.300.0000.00719.81
8.0.290.0070.00016.75
8.0.280.0070.00018.38
8.0.270.0000.00717.20
8.0.260.0030.00317.25
8.0.250.0050.00216.98
8.0.240.0000.00817.05
8.0.230.0030.00517.04
8.0.220.0040.00416.89
8.0.210.0070.00016.89
8.0.200.0030.00316.96
8.0.190.0000.00716.95
8.0.180.0030.00517.02
8.0.170.0070.00016.97
8.0.160.0030.00516.95
8.0.150.0040.00416.78
8.0.140.0040.00416.93
8.0.130.0050.00013.45
8.0.120.0000.00816.81
8.0.110.0000.00716.84
8.0.100.0050.00216.98
8.0.90.0040.00416.98
8.0.80.0080.00816.93
8.0.70.0070.00016.84
8.0.60.0000.00716.79
8.0.50.0040.00416.85
8.0.30.0100.00917.22
8.0.20.0130.01117.40
8.0.10.0000.00717.12
8.0.00.0120.00616.71
7.4.330.0050.00015.08
7.4.320.0030.00316.36
7.4.300.0030.00316.29
7.4.290.0030.00316.56
7.4.280.0040.00416.49
7.4.270.0000.00816.38
7.4.260.0030.00316.44
7.4.250.0000.00716.51
7.4.240.0040.00416.45
7.4.230.0030.00316.39
7.4.220.0040.01516.64
7.4.210.0080.01116.48
7.4.200.0030.00316.38
7.4.160.0030.01316.52
7.4.150.0160.00517.40
7.4.140.0090.01017.86
7.4.130.0130.00516.68
7.4.120.0130.00816.56
7.4.110.0100.01016.44
7.4.100.0120.00916.58
7.4.90.0030.01416.46
7.4.80.0120.00619.39
7.4.70.0110.01216.72
7.4.60.0140.00316.71
7.4.50.0030.00616.32
7.4.40.0060.00916.55
7.4.30.0100.01016.57
7.4.00.0130.00015.19
7.3.330.0030.00313.36
7.3.320.0050.00013.23
7.3.310.0000.00716.35
7.3.300.0040.00416.38
7.3.290.0070.00916.40
7.3.280.0120.00616.34
7.3.270.0100.00717.40
7.3.260.0060.01116.48
7.3.250.0060.01116.39
7.3.240.0100.00716.58
7.3.230.0130.00616.59
7.3.210.0070.01116.63
7.3.200.0110.01216.62
7.3.190.0120.00616.39
7.3.180.0130.00316.40
7.3.170.0160.00016.34
7.3.160.0060.01416.55
7.2.330.0110.00816.74
7.2.320.0130.01016.65
7.2.310.0190.00316.49
7.2.300.0100.00716.51
7.2.290.0070.01016.74
7.2.60.0160.00016.73
7.2.00.0030.01019.46
7.1.200.0000.00915.85
7.1.100.0000.01118.03
7.1.70.0000.00917.25
7.1.60.0100.01320.03
7.1.50.0110.01517.04
7.1.00.0070.06722.54
7.0.200.0030.00716.94
7.0.60.0100.06019.94
7.0.50.0070.08717.90
7.0.40.0030.04720.13
7.0.30.0300.07720.08
7.0.20.0070.05020.07
7.0.10.0200.07720.16
7.0.00.0070.08720.22
5.6.280.0000.06321.07
5.6.210.0100.06720.51
5.6.200.0030.06718.16
5.6.190.0070.04320.63
5.6.180.0470.06320.63
5.6.170.0270.07320.52
5.6.160.0070.08720.48
5.6.150.0070.03318.28
5.6.140.0100.05018.18
5.6.130.0270.06318.28
5.6.120.0130.06320.90
5.6.110.0100.07720.99
5.6.100.0030.04021.09
5.6.90.0070.05321.01
5.6.80.0170.07320.41
5.5.350.4230.04020.48
5.5.340.0070.04017.96
5.5.330.0170.07320.29
5.5.320.0270.04720.36
5.5.310.0470.06720.29
5.5.300.0100.04318.05
5.5.290.0000.04718.03
5.5.280.0130.08020.74
5.5.270.0100.08020.87
5.5.260.0100.08720.90
5.5.250.0000.08720.80
5.5.240.0070.07320.28
5.4.450.0330.06019.69
5.4.440.0470.04719.30
5.4.430.0370.05319.56
5.4.420.0430.06019.54
5.4.410.0430.06019.56
5.4.400.0430.05019.36
5.4.390.0500.05019.16
5.4.380.0400.05019.24
5.4.370.0530.06019.27
5.4.360.0470.05719.21
5.4.350.0500.05019.13
5.4.340.0530.05019.14
5.4.320.0400.06019.14
5.4.310.0470.05318.86
5.4.300.0370.06019.25
5.4.290.0430.05319.14
5.4.280.0430.05319.15
5.4.270.0430.05319.27
5.4.260.0600.06019.25
5.4.250.0300.05719.27
5.4.240.0730.05318.86
5.4.230.0530.04319.04
5.4.220.0430.05719.14
5.4.210.0470.05319.12
5.4.200.0530.04319.24
5.4.190.0470.05319.12
5.4.180.0530.04318.99
5.4.170.0570.04719.21
5.4.160.0470.05019.10
5.4.150.0430.05318.95
5.4.140.0470.05016.64
5.4.130.0430.05316.46
5.4.120.0470.05016.50
5.4.110.0530.04316.48
5.4.100.0330.05316.63
5.4.90.0570.05016.68
5.4.80.0500.04716.31
5.4.70.0270.06716.58
5.4.60.0230.04716.23
5.4.50.0200.07016.55
5.4.40.0400.03316.43
5.4.30.0030.03016.43
5.4.20.0270.05016.53
5.4.10.0400.03316.42

preferences:
49.1 ms | 401 KiB | 5 Q