3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $bar; public function getBar() { if (empty(self::$bar)) { self::$bar = new \DateTime(); } return self::$bar; } } var_dump(Foo::$bar); $a = new Foo(); $a->getBar(); var_dump(Foo::$bar);

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.0090.00616.75
8.3.50.0120.00316.74
8.3.40.0060.00918.75
8.3.30.0040.01118.96
8.3.20.0040.00420.34
8.3.10.0040.00421.83
8.3.00.0000.00821.75
8.2.180.0120.00916.88
8.2.170.0110.00422.96
8.2.160.0090.00620.29
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00319.00
8.2.120.0040.00426.35
8.2.110.0030.00619.31
8.2.100.0090.00317.93
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0030.00617.88
8.2.60.0040.00418.03
8.2.50.0080.00018.09
8.2.40.0040.00420.52
8.2.30.0000.00719.54
8.2.20.0000.00717.96
8.2.10.0050.00318.14
8.2.00.0040.00418.13
8.1.280.0070.01025.92
8.1.270.0040.00422.01
8.1.260.0000.00828.09
8.1.250.0050.00328.09
8.1.240.0030.00622.56
8.1.230.0040.00817.89
8.1.220.0050.00317.76
8.1.210.0030.00618.77
8.1.200.0050.00517.47
8.1.190.0050.00317.35
8.1.180.0000.00918.10
8.1.170.0050.00518.58
8.1.160.0050.00220.89
8.1.150.0040.00420.81
8.1.140.0000.00819.63
8.1.130.0070.00017.73
8.1.120.0030.00417.56
8.1.110.0040.00417.67
8.1.100.0030.00617.59
8.1.90.0050.00217.62
8.1.80.0030.00617.63
8.1.70.0000.00817.74
8.1.60.0000.00917.69
8.1.50.0040.00417.70
8.1.40.0050.00517.63
8.1.30.0090.00017.68
8.1.20.0070.00017.75
8.1.10.0000.00817.71
8.1.00.0000.00717.64
8.0.300.0050.00318.89
8.0.290.0040.00416.88
8.0.280.0070.00018.54
8.0.270.0070.00017.36
8.0.260.0030.00317.26
8.0.250.0030.00317.09
8.0.240.0030.00317.22
8.0.230.0070.00017.22
8.0.220.0020.00617.12
8.0.210.0030.00317.11
8.0.200.0070.00017.18
8.0.190.0030.00517.10
8.0.180.0070.00017.09
8.0.170.0040.00417.01
8.0.160.0030.00317.09
8.0.150.0000.00717.10
8.0.140.0040.00417.03
8.0.130.0000.00513.44
8.0.120.0000.00816.91
8.0.110.0000.00817.19
8.0.100.0040.00417.09
8.0.90.0000.00817.13
8.0.80.0040.01717.07
8.0.70.0000.00716.92
8.0.60.0040.00416.98
8.0.50.0040.00417.13
8.0.30.0110.00917.25
8.0.20.0090.00917.49
8.0.10.0000.00817.22
8.0.00.0040.01216.76
7.4.330.0020.00216.66
7.4.320.0000.00616.72
7.4.300.0000.00716.56
7.4.290.0000.01116.57
7.4.280.0040.00416.69
7.4.270.0030.00316.77
7.4.260.0030.00316.64
7.4.250.0050.00216.52
7.4.240.0030.00316.55
7.4.230.0030.00416.83
7.4.220.0120.00916.86
7.4.210.0060.01216.65
7.4.200.0020.00516.87
7.4.160.0060.00916.75
7.4.150.0110.00717.40
7.4.140.0080.01417.86
7.4.130.0140.00416.60
7.4.120.0150.00516.68
7.4.110.0100.01016.53
7.4.100.0070.01116.60
7.4.90.0130.00416.63
7.4.80.0090.01219.39
7.4.70.0040.01216.75
7.4.60.0120.00916.85
7.4.50.0070.01016.77
7.4.40.0160.00016.71
7.4.30.0150.00616.68
7.4.00.0090.00815.21
7.3.330.0020.00213.44
7.3.320.0050.00013.45
7.3.310.0070.00016.35
7.3.300.0040.00416.32
7.3.290.0000.00716.37
7.3.280.0070.00916.44
7.3.270.0120.00617.40
7.3.260.0080.00816.46
7.3.250.0100.00716.43
7.3.240.0110.00716.46
7.3.230.0100.00716.43
7.3.210.0140.00316.50
7.3.200.0120.00619.39
7.3.190.0040.01416.50
7.3.180.0100.00616.41
7.3.170.0060.01116.44
7.3.160.0070.01416.66
7.3.120.0070.01015.20
7.3.110.0030.01214.96
7.3.100.0060.00514.73
7.3.90.0080.00515.04
7.3.80.0060.00814.92
7.3.70.0050.00615.02
7.3.60.0050.00914.81
7.3.50.0050.00914.85
7.3.40.0030.01214.99
7.3.30.0030.01114.73
7.3.20.0080.00616.65
7.3.10.0090.00716.58
7.3.00.0100.00316.87
7.2.330.0100.00717.04
7.2.320.0100.01016.73
7.2.310.0170.00716.89
7.2.300.0120.00616.49
7.2.290.0060.01316.68
7.2.250.0100.01014.94
7.2.240.0080.00815.04
7.2.230.0110.00514.91
7.2.220.0030.01214.81
7.2.210.0020.01215.34
7.2.200.0020.01214.95
7.2.190.0060.00814.96
7.2.180.0090.00414.99
7.2.170.0050.01114.98
7.2.160.0030.01315.09
7.2.150.0130.00316.88
7.2.140.0070.01016.92
7.2.130.0110.00717.00
7.2.120.0030.01016.91
7.2.110.0000.00916.98
7.2.100.0000.01417.13
7.2.90.0030.01217.22
7.2.80.0000.01017.07
7.2.70.0030.00616.88
7.2.60.0070.00716.90
7.2.50.0110.00416.89
7.2.40.0070.01117.21
7.2.30.0040.01117.09
7.2.20.0060.01017.00
7.2.10.0030.01017.18
7.2.00.0050.00818.11
7.1.330.0090.00915.78
7.1.320.0070.00715.80
7.1.310.0080.00615.57
7.1.300.0050.00715.86
7.1.290.0020.01115.77
7.1.280.0050.00915.80
7.1.270.0030.00815.67
7.1.260.0080.00515.89
7.1.250.0080.00015.76
7.1.200.0000.01415.61
7.1.100.0030.01018.38
7.1.70.0030.00517.16
7.1.60.0100.00619.40
7.1.50.0040.01816.84
7.1.00.0070.07322.57
7.0.200.0680.00014.42
7.0.60.0200.08319.92
7.0.50.0100.08017.86
7.0.40.0030.05020.05
7.0.30.0170.06020.30
7.0.20.0270.08020.20
7.0.10.0030.04320.21
7.0.00.0000.04720.06
5.6.280.0070.04320.91
5.6.210.0030.04020.54
5.6.200.0070.08018.22
5.6.190.0100.05320.61
5.6.180.0300.07020.68
5.6.170.0270.08720.71
5.6.160.0100.06320.61
5.6.150.0100.07018.15
5.6.140.0000.08718.19
5.6.130.0070.06718.13
5.6.120.0030.06020.99
5.6.110.0100.08321.02
5.6.100.0100.05020.85
5.6.90.0100.04020.98
5.6.80.0100.07020.38
5.5.350.0270.07720.36
5.5.340.0100.03717.99
5.5.330.0130.05320.29
5.5.320.0570.06720.25
5.5.310.0230.03720.29
5.5.300.0000.04318.02
5.5.290.0200.06717.98
5.5.280.0070.07020.63
5.5.270.0030.09020.64
5.5.260.0170.07320.76
5.5.250.0030.04020.50
5.5.240.0170.07020.35

preferences:
60.36 ms | 401 KiB | 5 Q