3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ static public $b; static public function init(){ (self::$b)(); self::$b=function(){}; } } a::$b=function(){echo 'Here I do very heavy stuff, but will happen only in the first time I call init()';}; for($i=0;$i<3;$i++){ a::init(); }

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.0150.00016.63
8.3.50.0160.00521.96
8.3.40.0030.01018.79
8.3.30.0100.00618.67
8.3.20.0000.00820.72
8.3.10.0080.00023.65
8.3.00.0040.00422.52
8.2.180.0120.00818.21
8.2.170.0060.00922.96
8.2.160.0200.00021.04
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00022.25
8.2.120.0050.00326.35
8.2.110.0060.00322.27
8.2.100.0060.00617.72
8.2.90.0040.00417.63
8.2.80.0050.00318.83
8.2.70.0090.00017.50
8.2.60.0040.00417.47
8.2.50.0080.00017.63
8.2.40.0040.00418.16
8.2.30.0040.00418.00
8.2.20.0000.00717.69
8.2.10.0070.00018.11
8.2.00.0040.00418.12
8.1.280.0120.00325.92
8.1.270.0060.00323.72
8.1.260.0000.00828.09
8.1.250.0070.00028.09
8.1.240.0030.00622.47
8.1.230.0040.00720.97
8.1.220.0000.00818.64
8.1.210.0000.00818.77
8.1.200.0000.00817.65
8.1.190.0040.00417.23
8.1.180.0030.00619.44
8.1.170.0000.00918.57
8.1.160.0040.00419.02
8.1.150.0030.00718.80
8.1.140.0040.00418.88
8.1.130.0030.00517.74
8.1.120.0040.00417.49
8.1.110.0060.00317.45
8.1.100.0060.00317.36
8.1.90.0000.00717.39
8.1.80.0030.00617.50
8.1.70.0030.00617.43
8.1.60.0080.00017.58
8.1.50.0030.00617.40
8.1.40.0040.00417.52
8.1.30.0030.00517.55
8.1.20.0030.00617.67
8.1.10.0080.00017.61
8.1.00.0000.00717.39
8.0.300.0050.00218.77
8.0.290.0060.00316.63
8.0.280.0030.00318.49
8.0.270.0070.00017.89
8.0.260.0030.00316.82
8.0.250.0060.00016.86
8.0.240.0030.00316.95
8.0.230.0030.00316.95
8.0.220.0030.00316.66
8.0.210.0000.00616.74
8.0.200.0070.00016.95
8.0.190.0050.00216.84
8.0.180.0000.00716.88
8.0.170.0000.00716.88
8.0.160.0000.00716.88
8.0.150.0000.00716.79
8.0.140.0000.00816.83
8.0.130.0050.00013.38
8.0.120.0000.00816.80
8.0.110.0070.00216.93
8.0.100.0040.00416.68
8.0.90.0050.00316.76
8.0.80.0100.00716.90
8.0.70.0040.00416.83
8.0.60.0070.00016.74
8.0.50.0020.00516.88
8.0.30.0130.00617.00
8.0.20.0080.01117.40
8.0.10.0040.00417.05
8.0.00.0100.00716.80
7.4.330.0030.00315.08
7.4.320.0060.00016.47
7.4.300.0060.00016.60
7.4.290.0000.00716.59
7.4.280.0000.00716.51
7.4.270.0000.00716.57
7.4.260.0040.00416.53
7.4.250.0030.00316.44
7.4.240.0000.00716.48
7.4.230.0050.00216.70
7.4.220.0210.00616.60
7.4.210.0040.01116.68
7.4.200.0030.00316.50
7.4.160.0050.01216.56
7.4.150.0060.01317.40
7.4.140.0180.00717.86
7.4.130.0080.01016.49
7.4.120.0090.00816.47
7.4.110.0090.00616.52
7.4.100.0060.01716.51
7.4.90.0150.00316.50
7.4.80.0100.00719.39
7.4.70.0080.00816.26
7.4.60.0140.00316.55
7.4.50.0070.00716.46
7.4.40.0220.00016.50
7.4.30.0040.01116.38
7.4.00.0050.00314.89
7.3.330.0020.00213.23
7.3.320.0030.00313.17
7.3.310.0040.00416.41
7.3.300.0000.00716.29
7.3.290.0100.00716.31
7.3.280.0080.00816.29
7.3.270.0040.01417.40
7.3.260.0080.00816.41
7.3.250.0120.00716.34
7.3.240.0070.01016.49
7.3.230.0090.00916.55
7.3.210.0150.00016.64
7.3.200.0130.00416.39
7.3.190.0080.00816.18
7.3.180.0070.01016.56
7.3.170.0080.01816.31
7.3.160.0130.00316.54
7.2.330.0130.00716.43
7.2.320.0190.00316.87
7.2.310.0100.00616.56
7.2.300.0090.00616.77
7.2.290.0060.01316.80
7.2.60.0030.01016.90
7.2.30.0120.01218.92
7.2.20.0100.01018.96
7.2.10.0090.01118.89
7.2.00.0080.00919.01
7.1.200.0130.00015.66
7.1.150.0110.01217.56
7.1.140.0110.01117.63
7.1.130.0080.01117.65
7.1.120.0100.01017.59
7.1.110.0090.01017.06
7.1.100.0080.00917.40
7.1.90.0130.00817.32
7.1.80.0150.01216.99
7.1.70.0080.00716.45
7.1.60.0210.01228.50
7.1.50.0250.01428.18
7.1.40.0270.01533.44
7.1.30.0320.01433.52
7.1.20.0290.01633.69
7.1.10.0090.01115.68
7.1.00.0100.03117.31
7.0.270.0070.01117.27
7.0.260.0090.00917.19
7.0.250.0090.00916.73
7.0.240.0110.01016.96
7.0.230.0090.00916.81
7.0.220.0070.01016.85
7.0.210.0120.00815.76
7.0.200.0190.01015.43
7.0.190.0110.00915.84
7.0.180.0070.01115.29
7.0.170.0080.01015.42
7.0.160.0110.00915.28
7.0.150.0110.00815.30
7.0.140.0120.00715.52
7.0.130.0110.01115.55
7.0.120.0080.01115.61
7.0.110.0100.01215.26
7.0.100.0250.03716.78
7.0.90.0070.03216.92
7.0.80.0120.02516.95
7.0.70.0090.02916.91
7.0.60.0110.02816.84
7.0.50.0110.03416.46
7.0.40.0090.03216.96
7.0.30.0110.02716.40
7.0.20.0090.03017.05
7.0.10.0070.03616.32
7.0.00.0080.02416.99
5.6.300.0190.06520.77
5.6.290.0190.05920.76
5.6.280.0150.05820.88
5.6.270.0170.07020.91
5.6.260.0210.07720.93
5.6.250.0150.06720.73
5.6.240.0150.07620.75
5.6.230.0130.07720.73
5.6.220.0130.05820.73
5.6.210.0170.06820.69
5.6.200.0150.07020.80
5.6.190.0130.06920.93
5.6.180.0140.06420.93
5.6.170.0160.07820.84
5.6.160.0180.06620.85
5.6.150.0120.07220.83
5.6.140.0120.07220.85
5.6.130.0180.06920.83
5.6.120.0160.06220.89
5.6.110.0130.06220.89
5.6.100.0110.06920.93
5.6.90.0180.06320.83
5.6.80.0140.05320.23
5.6.70.0150.05820.35
5.6.60.0140.07420.16
5.6.50.0160.06120.31
5.6.40.0110.06420.27
5.6.30.0130.06320.27
5.6.20.0130.06620.28
5.6.10.0160.06420.27
5.6.00.0110.06820.19

preferences:
69.04 ms | 401 KiB | 5 Q