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("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)
8.3.60.0040.01116.50
8.3.50.0090.00721.13
8.3.40.0110.00718.77
8.3.30.0070.00718.61
8.3.20.0050.00220.34
8.3.10.0030.00623.37
8.3.00.0060.00319.69
8.2.180.0100.01016.50
8.2.170.0100.00722.96
8.2.160.0070.01020.29
8.2.150.0060.00324.18
8.2.140.0060.01324.66
8.2.130.0080.00026.16
8.2.120.0070.00020.78
8.2.110.0080.00021.04
8.2.100.0080.00417.91
8.2.90.0000.00917.97
8.2.80.0060.00318.03
8.2.70.0000.01017.75
8.2.60.0030.00617.91
8.2.50.0040.00418.07
8.2.40.0030.00619.23
8.2.30.0000.00719.81
8.2.20.0040.00417.75
8.2.10.0040.00418.11
8.2.00.0000.00818.11
8.1.280.0120.00325.92
8.1.270.0000.00820.23
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00322.51
8.1.230.0040.00820.79
8.1.220.0000.01017.74
8.1.210.0000.00818.85
8.1.200.0030.00617.23
8.1.190.0050.00317.23
8.1.180.0070.00018.10
8.1.170.0080.00418.64
8.1.160.0070.00022.03
8.1.150.0030.00618.89
8.1.140.0040.00417.38
8.1.130.0030.00517.69
8.1.120.0040.00417.36
8.1.110.0080.00017.37
8.1.100.0030.00617.48
8.1.90.0040.00417.47
8.1.80.0000.00717.33
8.1.70.0080.00017.36
8.1.60.0040.00417.61
8.1.50.0040.00417.56
8.1.40.0040.00417.42
8.1.30.0030.00517.48
8.1.20.0040.00417.59
8.1.10.0070.00017.62
8.1.00.0000.00817.50
8.0.300.0040.00419.89
8.0.290.0040.00416.75
8.0.280.0000.00718.51
8.0.270.0040.00417.30
8.0.260.0070.00017.18
8.0.250.0000.00716.93
8.0.240.0030.00516.95
8.0.230.0050.00316.89
8.0.220.0070.00016.92
8.0.210.0030.00316.95
8.0.200.0000.00617.00
8.0.190.0000.00816.95
8.0.180.0100.00016.87
8.0.170.0070.00016.93
8.0.160.0040.00416.98
8.0.150.0030.00516.91
8.0.140.0000.00716.84
8.0.130.0060.00013.38
8.0.120.0000.00816.81
8.0.110.0020.00516.80
8.0.100.0040.00416.85
8.0.90.0040.00416.86
8.0.80.0120.00617.00
8.0.70.0040.00416.85
8.0.60.0040.00417.00
8.0.50.0040.00416.75
8.0.30.0070.01117.13
8.0.20.0050.01317.40
8.0.10.0070.00017.09
8.0.00.0100.00716.79
7.4.330.0030.00315.08
7.4.320.0070.00016.30
7.4.300.0000.00616.53
7.4.290.0000.00816.52
7.4.280.0080.00016.45
7.4.270.0000.00816.52
7.4.260.0000.01016.43
7.4.250.0000.00816.51
7.4.240.0020.00516.45
7.4.230.0000.00716.53
7.4.220.0030.01516.43
7.4.210.0040.01116.56
7.4.200.0050.00316.61
7.4.160.0150.00716.61
7.4.150.0130.00417.40
7.4.140.0110.01017.86
7.4.130.0090.01016.56
7.4.120.0100.01016.50
7.4.110.0100.01016.66
7.4.100.0090.00916.53
7.4.90.0200.00016.39
7.4.80.0120.00619.39
7.4.70.0030.01516.47
7.4.60.0100.00716.36
7.4.50.0030.00616.29
7.4.40.0060.01016.63
7.4.30.0090.00916.59
7.4.00.0040.00915.04
7.3.330.0000.00613.23
7.3.320.0000.00513.29
7.3.310.0070.00016.33
7.3.300.0030.00316.37
7.3.290.0070.00816.32
7.3.280.0080.01116.36
7.3.270.0050.01317.40
7.3.260.0080.00816.41
7.3.250.0120.00916.40
7.3.240.0100.00716.39
7.3.230.0120.00816.52
7.3.210.0000.01616.68
7.3.200.0190.00716.55
7.3.190.0070.01016.52
7.3.180.0070.01016.54
7.3.170.0170.00016.46
7.3.160.0150.00416.35
7.3.120.0080.00914.76
7.3.110.0050.01314.74
7.3.100.0070.00714.78
7.3.90.0070.00514.97
7.3.80.0080.00714.74
7.3.70.0020.01014.71
7.3.60.0040.00914.76
7.3.50.0080.00814.66
7.3.40.0060.00814.88
7.3.30.0050.00814.72
7.3.20.0070.00516.54
7.3.10.0090.00616.71
7.3.00.0040.00916.73
7.2.330.0090.00916.76
7.2.320.0070.01116.79
7.2.310.0080.00816.54
7.2.300.0090.00916.45
7.2.290.0090.01316.69
7.2.250.0070.01115.30
7.2.240.0030.01615.09
7.2.230.0060.01314.77
7.2.220.0060.00915.26
7.2.210.0050.00814.95
7.2.200.0090.00515.02
7.2.190.0070.00514.82
7.2.180.0050.00915.05
7.2.170.0070.00715.03
7.2.160.0130.00314.88
7.2.150.0000.01517.02
7.2.140.0030.00716.92
7.2.130.0060.00616.83
7.2.120.0090.00517.03
7.2.110.0060.00916.98
7.2.100.0030.01316.89
7.2.90.0040.00717.00
7.2.80.0080.00716.49
7.2.70.0050.01116.80
7.2.60.0060.00816.82
7.2.50.0030.01016.88
7.2.40.0070.00516.76
7.2.30.0060.00816.75
7.2.20.0090.00716.93
7.2.10.0080.00816.59
7.2.00.0070.00917.68
7.1.330.0080.00815.69
7.1.320.0070.00715.71
7.1.310.0090.00416.00
7.1.300.0070.00715.65
7.1.290.0060.00715.61
7.1.280.0060.00615.67
7.1.270.0050.00815.82
7.1.260.0030.00915.92
7.1.250.0000.01215.82
7.1.200.0070.00315.52
7.1.100.0030.00818.40
7.1.70.0030.01317.19
7.1.60.0100.01420.03
7.1.50.0100.01416.99
7.1.00.0000.07722.46
7.0.200.0000.00716.61
7.0.60.0130.04719.82
7.0.50.0030.04317.87
7.0.40.0100.08720.05
7.0.30.0300.04720.19
7.0.20.0230.08020.24
7.0.10.0030.04320.03
7.0.00.0070.07720.23
5.6.280.0030.04021.09
5.6.210.0070.06020.48
5.6.200.0030.08318.14
5.6.190.0070.07020.34
5.6.180.0370.06720.55
5.6.170.0300.07020.51
5.6.160.0100.08320.52
5.6.150.0100.04318.28
5.6.140.0100.03718.15
5.6.130.0030.09018.21
5.6.120.0070.05021.03
5.6.110.0170.07321.10
5.6.100.0170.07020.98
5.6.90.0030.07721.11
5.6.80.0030.04020.38
5.5.350.4170.04720.45
5.5.340.0070.03718.08
5.5.330.0030.08020.40
5.5.320.0200.04320.28
5.5.310.0300.07720.51
5.5.300.0070.03717.98
5.5.290.0100.07317.95
5.5.280.0030.08020.66
5.5.270.0100.04720.89
5.5.260.0100.08320.89
5.5.250.0030.08720.62
5.5.240.0070.07320.27
5.4.450.0230.05719.19
5.4.440.0170.05719.47
5.4.430.0230.05019.42
5.4.420.0100.05719.54
5.4.410.0200.04719.29
5.4.400.0170.04719.33
5.4.390.0130.05318.99
5.4.380.0230.05719.30
5.4.370.0270.04719.31
5.4.360.0130.05319.00
5.4.350.0170.05019.15
5.4.340.0170.05719.30
5.4.320.0000.07019.22
5.4.310.0030.06319.28
5.4.300.0170.05319.30
5.4.290.0230.04719.28
5.4.280.0130.05719.22
5.4.270.0200.04719.17
5.4.260.0100.05719.05
5.4.250.0130.05319.26
5.4.240.0130.06719.05
5.4.230.0230.04719.15
5.4.220.0230.07019.30
5.4.210.0270.05719.27
5.4.200.0200.05019.21
5.4.190.0330.03319.13
5.4.180.0130.05719.37
5.4.170.0130.05319.25
5.4.160.0100.07019.25
5.4.150.0300.06319.34
5.4.140.0230.04316.79
5.4.130.0130.05016.39
5.4.120.0170.05716.44
5.4.110.0130.05316.62
5.4.100.0130.05016.69
5.4.90.0130.04716.58
5.4.80.0130.04716.65
5.4.70.0270.06016.55
5.4.60.0200.04016.43
5.4.50.0330.06016.45
5.4.40.0230.07716.53
5.4.30.0000.03316.43
5.4.20.0170.06016.53
5.4.10.0400.06016.33

preferences:
54.62 ms | 401 KiB | 5 Q