3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() { $nothing = isset($this) ? 'Instance' : 'Class'; } } class Baz { function test() { $objDateTime = new DateTime('NOW'); echo 'Baz->test()::DEBUT: ' . $objDateTime->format('c'), '\n'; for($index=1; $index <100; $index++) { Foo::bar(); } $objDateTime = new DateTime('NOW'); echo 'Baz->test()::FIN: ' . $objDateTime->format('c'), '\n'; } } $baz = new Baz; $baz->test(); class FooPropre { public static function barPropre() { $nothing = isset($this) ? 'Instance' : 'Class'; } } class BazPropre { function testPropre() { $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::DEBUT: ' . $objDateTime->format('c'), '\n'; for($index=1; $index <100; $index++) { FooPropre::barPropre(); } $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::FIN: ' . $objDateTime->format('c'), '\n'; } } $baz = new BazPropre; $baz->testPropre();

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.0110.00418.68
8.3.50.0180.01121.21
8.3.40.0070.01118.94
8.3.30.0070.00720.29
8.3.20.0000.00820.20
8.3.10.0060.00321.00
8.3.00.0040.00422.37
8.2.180.0180.00417.13
8.2.170.0140.00722.96
8.2.160.0110.00722.08
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0000.00820.78
8.2.110.0100.00619.27
8.2.100.0040.00717.91
8.2.90.0050.00319.34
8.2.80.0040.00418.05
8.2.70.0040.00417.63
8.2.60.0060.00617.93
8.2.50.0030.00518.07
8.2.40.0040.00418.34
8.2.30.0000.00819.44
8.2.20.0060.00319.65
8.2.10.0000.00817.91
8.2.00.0000.00717.88
8.1.270.0000.00724.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00022.43
8.1.230.0080.00320.89
8.1.220.0060.00318.77
8.1.210.0000.00819.01
8.1.200.0060.00317.48
8.1.190.0000.00817.43
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0070.00018.84
8.1.150.0040.00418.76
8.1.140.0000.00817.61
8.1.130.0070.00017.89
8.1.120.0040.00417.60
8.1.110.0030.00617.60
8.1.100.0040.00417.46
8.1.90.0040.00417.64
8.1.80.0000.00717.55
8.1.70.0000.00717.57
8.1.60.0030.00617.62
8.1.50.0050.00217.58
8.1.40.0080.00017.61
8.1.30.0000.00717.71
8.1.20.0050.00317.73
8.1.10.0060.00317.65
8.1.00.0030.00617.58
8.0.300.0060.00320.05
8.0.290.0000.01017.18
8.0.280.0000.00718.51
8.0.270.0030.00517.32
8.0.260.0000.00817.04
8.0.250.0000.00717.23
8.0.240.0000.00817.13
8.0.230.0030.00317.14
8.0.220.0050.00217.12
8.0.210.0030.00317.14
8.0.200.0060.00017.20
8.0.190.0040.00417.20
8.0.180.0000.00817.05
8.0.170.0000.00817.21
8.0.160.0040.00317.11
8.0.150.0040.00417.09
8.0.140.0000.00717.02
8.0.130.0030.00313.54
8.0.120.0080.00017.18
8.0.110.0040.00416.95
8.0.100.0040.00416.99
8.0.90.0050.00317.07
8.0.80.0040.01217.05
8.0.70.0040.00417.10
8.0.60.0000.00717.02
8.0.50.0000.00716.88
8.0.30.0120.00617.28
8.0.20.0140.00517.40
8.0.10.0000.00717.09
8.0.00.0140.00517.01
7.4.330.0030.00316.66
7.4.320.0000.00716.64
7.4.300.0030.00316.56
7.4.290.0070.00016.71
7.4.280.0000.00616.74
7.4.270.0030.00316.54
7.4.260.0000.00513.39
7.4.250.0000.00816.58
7.4.240.0010.00616.65
7.4.230.0040.00416.71
7.4.220.0100.01016.51
7.4.210.0110.00416.68
7.4.200.0070.00016.76
7.4.190.0000.00716.80
7.4.160.0110.00516.78
7.4.150.0110.00717.40
7.4.140.0150.00817.86
7.4.130.0080.01016.52
7.4.120.0100.00816.73
7.4.110.0190.00016.78
7.4.100.0030.01516.72
7.4.90.0000.01816.70
7.4.80.0090.00919.39
7.4.70.0030.01416.72
7.4.60.0070.01016.54
7.4.50.0030.00616.76
7.4.40.0150.00322.77
7.4.30.0110.00816.77
7.3.330.0000.00513.36
7.3.320.0050.00013.55
7.3.310.0040.00416.36
7.3.300.0030.00316.50
7.3.290.0030.01016.55
7.3.280.0060.01016.50
7.3.270.0110.00717.40
7.3.260.0090.01318.24
7.3.250.0150.00316.67
7.3.240.0090.01216.58
7.3.230.0100.00716.49
7.3.210.0140.00416.60
7.3.200.0070.01719.39
7.3.190.0100.01016.81
7.3.180.0150.00416.50
7.3.170.0120.01116.70
7.3.160.0140.00416.56
7.2.330.0080.01216.74
7.2.320.0070.01716.87
7.2.310.0120.01216.96
7.2.300.0100.01416.80
7.2.290.0180.00016.98
5.4.450.0100.05719.17
5.4.440.0070.05019.55
5.4.430.0170.04019.29
5.4.420.0170.04019.56
5.4.410.0130.04319.41
5.4.400.0170.03718.97
5.4.390.0270.02719.25
5.4.380.0170.03719.24
5.4.370.0200.05319.09
5.4.360.0130.04019.21
5.4.350.0170.06019.22
5.4.340.0170.03719.14
5.4.320.0170.03719.08
5.4.310.0200.03319.09
5.4.300.0230.03018.83
5.4.290.0200.03318.89
5.4.280.0170.03719.25
5.4.270.0200.03319.19
5.4.260.0230.04318.99
5.4.250.0130.04019.08
5.4.240.0230.04319.14
5.4.230.0200.04719.30
5.4.220.0170.04019.21
5.4.210.0200.03318.98
5.4.200.0200.03319.19
5.4.190.0200.03719.13
5.4.180.0170.03718.94
5.4.170.0170.04019.08
5.4.160.0070.03718.82
5.4.150.0200.03719.13
5.4.140.0130.04316.34
5.4.130.0170.03716.40
5.4.120.0200.03316.56
5.4.110.0130.04316.59
5.4.100.0230.04016.60
5.4.90.0200.03316.50
5.4.80.0230.03016.51
5.4.70.0170.03316.51
5.4.60.0200.03316.23
5.4.50.0230.03016.23
5.4.40.0200.03716.20
5.4.30.0130.03716.53
5.4.20.0130.03716.32
5.4.10.0130.03716.42
5.4.00.0330.04315.73
5.3.290.0230.04714.67
5.3.280.0200.03314.52
5.3.270.0130.04314.69
5.3.260.0170.04014.77
5.3.250.0170.03714.53
5.3.240.0230.03014.67
5.3.230.0370.04314.62
5.3.220.0130.03714.67
5.3.210.0130.04014.49
5.3.200.0130.03714.59
5.3.190.0130.03714.48
5.3.180.0170.06314.54
5.3.170.0230.03014.50
5.3.160.0200.03714.69
5.3.150.0200.04314.50
5.3.140.0130.03714.71
5.3.130.0270.03014.57
5.3.120.0170.04314.58
5.3.110.0130.04314.67
5.3.100.0230.03014.03
5.3.90.0200.04014.05
5.3.80.0130.04014.26
5.3.70.0200.03714.18
5.3.60.0170.04314.09
5.3.50.0270.03013.97
5.3.40.0200.04714.04
5.3.30.0170.05714.00
5.3.20.0230.05313.93
5.3.10.0200.04313.59
5.3.00.0130.04013.88

preferences:
47.51 ms | 400 KiB | 5 Q