3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $label; public function __construct($label) { $this->label = $label; } } class Baz{} class Bar { public function test(Foo $foo = null) { if( is_null($foo) ) { $foo = new Foo('I am not magic.'); } var_dump($foo); } } $baz = new Bar(); $baz->test(new Foo('burp')); $baz->test(); $baz->test(new Baz());

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.0120.00918.68
8.3.50.0140.00718.29
8.3.40.0070.01118.75
8.3.30.0160.00018.84
8.3.20.0030.00619.14
8.3.10.0070.00021.94
8.3.00.0080.00019.78
8.2.180.0100.01016.88
8.2.170.0110.00722.96
8.2.160.0100.00320.37
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0030.00520.79
8.2.110.0110.00021.12
8.2.100.0090.00317.72
8.2.90.0050.00319.08
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0070.00417.55
8.2.50.0040.00418.07
8.2.40.0050.00218.04
8.2.30.0030.00517.92
8.2.20.0030.00618.01
8.2.10.0040.00418.00
8.2.00.0040.00419.18
8.1.280.0060.01325.92
8.1.270.0040.00422.24
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00421.24
8.1.230.0040.00719.01
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0000.00817.23
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0040.00418.75
8.1.160.0040.00418.76
8.1.150.0040.00418.71
8.1.140.0000.00717.57
8.1.130.0000.00717.48
8.1.120.0040.00417.42
8.1.110.0040.00417.40
8.1.100.0040.00417.44
8.1.90.0070.00017.32
8.1.80.0030.00717.41
8.1.70.0030.00317.45
8.1.60.0000.00817.60
8.1.50.0030.00917.54
8.1.40.0050.00317.46
8.1.30.0040.00417.56
8.1.20.0080.00017.64
8.1.10.0000.00817.58
8.1.00.0000.00817.41
8.0.300.0060.00318.84
8.0.290.0040.00416.75
8.0.280.0030.00318.32
8.0.270.0030.00317.22
8.0.260.0070.00016.94
8.0.250.0000.00816.96
8.0.240.0070.00017.04
8.0.230.0030.00316.84
8.0.220.0030.00516.82
8.0.210.0060.00016.87
8.0.200.0030.00717.00
8.0.190.0000.00816.98
8.0.180.0040.00416.88
8.0.170.0040.00416.84
8.0.160.0040.00416.86
8.0.150.0040.00416.76
8.0.140.0030.00316.89
8.0.130.0060.00013.39
8.0.120.0040.00416.84
8.0.110.0040.00416.87
8.0.100.0040.00416.79
8.0.90.0050.00216.94
8.0.80.0060.01316.79
8.0.70.0050.00316.94
8.0.60.0000.00716.79
8.0.50.0050.00216.94
8.0.30.0090.01017.15
8.0.20.0150.00417.40
8.0.10.0040.00416.94
8.0.00.0080.01316.94
7.4.330.0000.00515.55
7.4.320.0030.00316.58
7.4.300.0030.00516.62
7.4.290.0070.00016.37
7.4.280.0030.00316.52
7.4.270.0040.00416.55
7.4.260.0070.00016.52
7.4.250.0040.00416.38
7.4.240.0070.00016.51
7.4.230.0030.00316.42
7.4.220.0040.00416.59
7.4.210.0110.00716.53
7.4.200.0030.00316.55
7.4.160.0060.01016.51
7.4.140.0110.00817.86
7.4.130.0070.01116.58
7.4.120.0140.00816.58
7.4.110.0120.00716.65
7.4.100.0110.00716.67
7.4.90.0170.00016.50
7.4.80.0110.00619.39
7.4.70.0000.01716.48
7.4.60.0080.00816.55
7.4.50.0030.01316.37
7.4.40.0060.01216.55
7.4.10.0100.01016.48
7.4.00.0090.00815.72
7.3.330.0000.00513.20
7.3.320.0070.00013.34
7.3.310.0030.00316.38
7.3.300.0070.00016.38
7.3.290.0060.00916.44
7.3.280.0100.00916.37
7.3.260.0080.00916.40
7.3.240.0120.00716.37
7.3.230.0110.00616.59
7.3.210.0160.00416.38
7.3.200.0030.01316.52
7.3.190.0110.00616.41
7.3.180.0130.00316.32
7.3.170.0030.01416.45
7.3.160.0100.00716.38
7.3.130.0060.01316.13
7.3.120.0100.00616.16
7.3.110.0150.00016.57
7.3.100.0060.01016.55
7.3.90.0070.00716.36
7.3.80.0110.00716.18
7.3.70.0060.00616.36
7.3.60.0120.00316.37
7.3.50.0040.01116.28
7.3.40.0100.00716.31
7.3.30.0000.01116.29
7.3.20.0060.01018.18
7.3.10.0100.00618.13
7.3.00.0030.00918.25
7.2.330.0110.00716.69
7.2.320.0090.00916.68
7.2.310.0130.00916.46
7.2.300.0100.00716.79
7.2.290.0030.01316.44
7.2.260.0060.01316.77
7.2.250.0040.01816.54
7.2.240.0030.01516.80
7.2.230.0150.00316.54
7.2.220.0100.00716.45
7.2.210.0080.00816.68
7.2.200.0130.00316.61
7.2.190.0030.01016.54
7.2.180.0000.01516.61
7.2.170.0030.00616.48
7.2.160.0130.00316.49
7.2.150.0040.01518.56
7.2.140.0070.01318.45
7.2.130.0070.00718.50
7.2.120.0040.01218.35
7.2.110.0070.01118.36
7.2.100.0140.00418.50
7.2.90.0060.01218.52
7.2.80.0030.00918.33
7.2.70.0100.00718.36
7.2.60.0070.00817.63
7.2.50.0030.01117.68
7.2.40.3820.00918.15
7.2.30.2540.02418.17
7.2.20.2390.01118.03
7.2.10.2610.00818.07
7.2.00.2070.00918.24
7.1.330.0040.01117.33
7.1.320.0040.00817.38
7.1.310.0070.01117.39
7.1.300.0030.00917.31
7.1.290.0030.00717.21
7.1.280.0030.00717.30
7.1.270.0090.01217.38
7.1.260.0090.00617.32
7.1.250.0030.00817.24
7.1.240.0100.00717.22
7.1.230.0070.00717.30
7.1.220.0050.00517.27
7.1.210.0130.00017.19
7.1.200.0030.01116.44
7.1.190.0080.00417.20
7.1.180.0000.01017.46
7.1.170.0040.00817.34
7.1.160.3380.01417.09
7.1.150.2970.01016.87
7.1.140.2370.00517.00
7.1.130.2450.01016.96
7.1.120.1950.00816.98
7.1.110.1760.00716.77
7.1.100.2010.00616.61
7.1.90.2030.01116.93
7.1.80.1980.01016.82
7.1.70.1200.00816.22
7.1.60.1840.00925.20
7.1.50.1640.01025.15
7.1.40.1150.01325.01
7.1.30.1460.01424.99
7.1.20.1700.01024.92
7.1.10.0940.00716.01
7.1.00.0590.00716.05
7.0.330.0040.01117.00
7.0.320.0040.00817.02
7.0.310.0030.00617.13
7.0.300.0100.00016.98
7.0.290.0030.00717.00
7.0.280.0110.00716.96
7.0.270.0000.01617.02
7.0.260.0060.00617.16
7.0.250.0090.00917.07
7.0.240.0030.01317.02
7.0.230.0070.01017.07
7.0.220.0070.01017.00
7.0.210.0110.00417.13
7.0.200.0000.01017.09
7.0.190.0100.01017.07
7.0.180.0090.00917.17
7.0.170.0070.00717.06
7.0.160.0030.01617.04
7.0.150.0030.01017.13
7.0.140.0040.01116.77
7.0.130.0030.01017.04
7.0.120.0030.00616.98
7.0.110.0080.00817.02
7.0.100.0000.01417.12
7.0.90.0090.00316.95
7.0.80.0030.00616.93
7.0.70.0090.00316.85
7.0.60.0100.00717.04
7.0.50.0040.01516.86
7.0.40.0030.01014.84
7.0.30.0070.00715.00
7.0.20.0060.01315.02
7.0.10.0160.00314.89
7.0.00.0060.01114.91
5.6.400.0100.00715.74
5.6.390.0100.00315.87
5.6.380.0030.01016.11
5.6.370.0080.00816.11
5.6.360.0030.01315.70
5.6.350.0040.01515.71
5.6.340.0080.01215.99
5.6.330.0090.00615.77
5.6.320.0060.00916.07
5.6.310.0120.00315.90
5.6.300.0030.01015.72
5.6.290.0040.00816.02
5.6.280.0030.00615.73
5.6.270.0090.00615.71
5.6.260.0070.00715.89
5.6.250.0050.00516.15
5.6.240.0000.00915.87
5.6.230.0100.00315.96
5.6.220.0060.00916.03
5.6.210.0090.00915.93
5.6.200.0100.00015.69
5.6.190.0050.01215.79
5.6.180.0080.01216.08
5.6.170.0080.00815.68
5.6.160.0100.00715.95
5.6.150.0060.01315.79
5.6.140.0080.01116.00
5.6.130.0060.00915.77
5.6.120.0030.01315.70
5.6.110.0030.01115.89
5.6.100.0070.00715.70
5.6.90.0080.01215.95
5.6.80.0030.01315.77
5.6.70.0090.00615.66
5.6.60.0100.01015.79
5.6.50.0090.00315.64
5.6.40.0060.00615.82
5.6.30.0090.00615.73
5.6.20.0110.00415.91
5.6.10.0100.00615.83
5.6.00.0100.00315.88

preferences:
61.33 ms | 400 KiB | 5 Q