3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function cre() { static $foo; if (null === $foo) $foo = 0; return ++$foo; } public function bar() { static $foo; if (null === $foo) $foo = 0; return ++$foo; } } $foo = new Foo; echo $foo->cre(); echo $foo->bar(); echo $foo->cre(); echo $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.0140.00418.43
8.3.50.0200.00921.14
8.3.40.0070.01018.67
8.3.30.0070.00720.34
8.3.20.0050.00320.57
8.3.10.0040.00420.92
8.3.00.0040.01123.63
8.2.180.0100.01016.75
8.2.170.0100.00322.96
8.2.160.0030.01020.34
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.96
8.2.110.0090.00020.93
8.2.100.0000.01017.78
8.2.90.0000.00719.22
8.2.80.0000.00719.21
8.2.70.0080.00017.38
8.2.60.0000.00818.03
8.2.50.0040.00418.07
8.2.40.0040.00418.28
8.2.30.0000.00719.37
8.2.20.0040.00417.79
8.2.10.0080.00017.63
8.2.00.0000.00817.74
8.1.280.0060.01225.92
8.1.270.0030.00623.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.40
8.1.230.0000.01421.04
8.1.220.0050.00318.77
8.1.210.0050.00318.86
8.1.200.0030.00717.23
8.1.190.0040.00417.41
8.1.180.0050.00318.10
8.1.170.0060.00318.52
8.1.160.0000.00718.82
8.1.150.0070.00018.71
8.1.140.0030.00617.37
8.1.130.0000.00717.83
8.1.120.0000.00717.47
8.1.110.0050.00217.36
8.1.100.0070.00017.39
8.1.90.0030.00317.32
8.1.80.0000.00717.43
8.1.70.0000.00717.37
8.1.60.0000.00917.64
8.1.50.0050.00217.41
8.1.40.0070.00017.45
8.1.30.0040.00417.67
8.1.20.0060.00317.54
8.1.10.0080.00017.50
8.1.00.0080.00017.56
8.0.300.0040.00419.89
8.0.290.0040.00417.15
8.0.280.0030.00318.46
8.0.270.0050.00317.27
8.0.260.0000.00618.37
8.0.250.0050.00316.95
8.0.240.0000.00716.87
8.0.230.0000.00716.87
8.0.220.0000.00716.82
8.0.210.0000.00716.87
8.0.200.0030.00316.82
8.0.190.0030.00516.85
8.0.180.0050.00216.96
8.0.170.0040.00416.82
8.0.160.0030.00416.87
8.0.150.0030.00616.83
8.0.140.0050.00316.88
8.0.130.0000.00513.36
8.0.120.0080.00016.82
8.0.110.0070.00016.82
8.0.100.0070.00016.80
8.0.90.0070.00016.80
8.0.80.0080.00716.95
8.0.70.0040.00416.92
8.0.60.0050.00216.75
8.0.50.0000.00716.88
8.0.30.0080.01117.03
8.0.20.0130.00617.40
8.0.10.0050.00316.92
8.0.00.0100.00916.91
7.4.330.0050.00016.83
7.4.320.0060.00016.46
7.4.300.0030.00316.50
7.4.290.0000.00616.51
7.4.280.0040.00416.60
7.4.270.0030.00316.53
7.4.260.0060.00013.27
7.4.250.0000.00816.58
7.4.240.0030.00316.44
7.4.230.0000.00716.66
7.4.220.0100.01316.48
7.4.210.0060.00916.52
7.4.200.0000.00716.56
7.4.190.0030.00516.70
7.4.160.0120.00316.70
7.4.150.0120.00617.40
7.4.140.0080.01017.86
7.4.130.0120.00516.51
7.4.120.0100.00616.59
7.4.110.0090.00816.44
7.4.100.0100.00716.54
7.4.90.0140.00716.46
7.4.80.0090.00919.39
7.4.70.0060.01216.38
7.4.60.0120.00916.46
7.4.50.0030.00616.46
7.4.40.0110.00422.77
7.4.30.0030.01716.29
7.4.00.0070.01015.10
7.3.330.0000.00513.23
7.3.320.0000.00613.17
7.3.310.0040.00416.18
7.3.300.0000.00716.21
7.3.290.0070.00716.28
7.3.280.0110.00716.30
7.3.270.0140.00317.40
7.3.260.0130.00818.24
7.3.250.0110.00616.44
7.3.240.0140.00316.57
7.3.230.0140.00316.50
7.3.210.0120.00616.48
7.3.200.0030.01319.39
7.3.190.0080.00816.25
7.3.180.0120.00816.38
7.3.170.0140.00316.29
7.3.160.0080.00816.27
7.3.120.0070.01314.85
7.3.110.0040.00814.85
7.3.100.0120.00314.59
7.3.90.0070.00414.74
7.3.80.0040.00714.91
7.3.70.0000.01114.78
7.3.60.0030.01014.78
7.3.50.0030.01214.70
7.3.40.0000.01214.68
7.3.30.0000.00814.71
7.3.20.0070.00716.55
7.3.10.0030.00716.23
7.3.00.0000.01316.46
7.2.330.0120.00616.70
7.2.320.0070.01016.76
7.2.310.0090.01216.92
7.2.300.0100.01316.43
7.2.290.0130.01016.44
7.2.240.0040.00814.79
7.2.230.0070.00714.76
7.2.220.0000.01014.70
7.2.210.0000.01515.19
7.2.200.0000.01014.82
7.2.190.0060.00815.04
7.2.180.0000.01415.03
7.2.170.0030.01015.13
7.2.160.0070.00715.00
7.2.150.0100.00716.77
7.2.140.0060.00616.97
7.2.130.0030.00616.66
7.2.120.0040.01216.92
7.2.110.0070.00316.76
7.2.100.0000.01317.04
7.2.90.0070.00416.74
7.2.80.0060.00317.07
7.2.70.0000.01116.85
7.2.60.0060.00617.04
7.2.50.0070.00716.80
7.2.40.0040.01116.68
7.2.30.0030.00716.93
7.2.20.0060.00917.07
7.2.10.0000.01516.94
7.2.00.0030.00818.17
7.1.330.0060.00715.63
7.1.320.0060.00815.69
7.1.310.0040.00715.42
7.1.300.0060.00315.48
7.1.290.0070.00315.76
7.1.280.0070.01015.91
7.1.270.0000.01115.39
7.1.260.0030.01015.63
7.1.250.0070.00715.77
7.1.100.0070.00418.19
7.1.70.0910.00715.08
7.1.60.0030.01316.87
7.1.50.0640.01316.60
7.1.00.0000.03722.46
7.0.200.0060.00916.75
7.0.140.0070.07022.21
7.0.100.0070.07321.86
7.0.90.0000.07721.66
7.0.80.0000.03721.76
7.0.70.0100.05021.67
7.0.60.0030.09021.88
7.0.50.0000.07722.06
7.0.40.0100.06020.09
7.0.30.0000.08719.95
7.0.20.0000.04020.12
7.0.10.0070.08720.12
7.0.00.0030.08719.99
5.6.280.0000.07720.89
5.6.250.0030.07320.76
5.6.240.0100.03020.69
5.6.230.0070.07720.64
5.6.220.0000.03720.60
5.6.210.0070.08020.69
5.6.200.0000.03721.04
5.6.190.0000.04321.05
5.6.180.0070.04721.08
5.6.170.0070.06321.05
5.6.160.0100.06721.10
5.6.150.0070.07721.05
5.6.140.0000.03721.02
5.6.130.0030.08321.01
5.6.120.0070.07721.06
5.6.110.0070.07721.03
5.6.100.0000.04320.96
5.6.90.0070.07021.07
5.6.80.0000.03320.49
5.6.70.0000.05720.34
5.6.60.0030.06020.48
5.6.50.0100.06720.45
5.6.40.0000.06320.44
5.6.30.0030.07720.40
5.6.20.0000.07020.31
5.6.10.0000.03720.28
5.6.00.0030.03320.41
5.5.380.0000.03720.46
5.5.370.0030.03320.36
5.5.360.0030.03320.48
5.5.350.0030.05320.45
5.5.340.0100.07320.87
5.5.330.0070.07320.92
5.5.320.0030.03320.65
5.5.310.0000.08320.91
5.5.300.0130.05020.90
5.5.290.0070.07020.93
5.5.280.0000.04320.77
5.5.270.0030.04720.73
5.5.260.0030.06020.89
5.5.250.0030.07720.69
5.5.240.0130.02320.27
5.5.230.0030.07320.19
5.5.220.0000.07320.23
5.5.210.0000.03320.21
5.5.200.0000.06720.25
5.5.190.0100.05019.98
5.5.180.0000.06020.20
5.5.160.0000.08020.24
5.5.150.0070.07320.15
5.5.140.0000.04720.14
5.5.130.0030.07720.18
5.5.120.0030.07320.24
5.5.110.0000.04720.13
5.5.100.0030.03720.18
5.5.90.0000.07720.06
5.5.80.0000.03320.16
5.5.70.0030.08020.13
5.5.60.0070.05720.05
5.5.50.0030.07020.04
5.5.40.0030.05720.06
5.5.30.0070.06720.03
5.5.20.0000.03319.93
5.5.10.0030.07720.13
5.5.00.0000.05719.97
5.4.450.0100.06319.50
5.4.440.0130.07319.35
5.4.430.0000.08319.35
5.4.420.0000.04319.45
5.4.410.0130.06719.32
5.4.400.0030.03318.91
5.4.390.0000.08018.90
5.4.380.0030.07718.87
5.4.370.0070.07319.00
5.4.360.0130.02718.85
5.4.350.0000.03319.11
5.4.340.0000.03318.92
5.4.320.0000.03318.95
5.4.310.0000.07719.20
5.4.300.0000.07718.84
5.4.290.0030.03318.94
5.4.280.0030.05018.95
5.4.270.0000.07319.02
5.4.260.0070.03018.94
5.4.250.0070.06019.13
5.4.240.0070.02719.16
5.4.230.0130.02018.86
5.4.220.0030.08319.03
5.4.210.0070.07019.15
5.4.200.0000.08019.15
5.4.190.0000.08019.10
5.4.180.0000.07319.11
5.4.170.0030.07019.03
5.4.160.0030.06019.08
5.4.150.0070.08018.88
5.4.140.0000.07316.44
5.4.130.0030.07016.44
5.4.120.0000.07316.27
5.4.110.0030.07016.40
5.4.100.0030.07016.47
5.4.90.0000.03016.46
5.4.80.0030.03316.41
5.4.70.0000.05716.45
5.4.60.0030.05716.43
5.4.50.0030.05716.50
5.4.40.0000.07316.54
5.4.30.0030.03716.53
5.4.20.0000.06016.33
5.4.10.0000.03316.45
5.4.00.0000.03015.80
5.3.290.0070.08015.59
5.3.280.0070.07715.59
5.3.270.0000.07315.59
5.3.260.0030.03715.59
5.3.250.0030.03315.59
5.3.240.0030.07015.59
5.3.230.0000.06315.59
5.3.220.0000.03315.59
5.3.210.0000.07015.59
5.3.200.0070.02715.59
5.3.190.0000.06715.59
5.3.180.0000.03715.59
5.3.170.0070.03015.59
5.3.160.0070.06715.59
5.3.150.0000.06015.59
5.3.140.0030.07015.59
5.3.130.0030.05715.59
5.3.120.0000.07015.59
5.3.110.0030.07015.59
5.3.100.0030.08015.59
5.3.90.0000.03015.59
5.3.80.0030.06715.59
5.3.70.0000.03015.59
5.3.60.0030.07315.59
5.3.50.0000.06315.59
5.3.40.0030.05315.59
5.3.30.0030.02715.59
5.3.20.0000.05315.59
5.3.10.0030.06715.59
5.3.00.0000.03015.59
5.2.170.0030.06015.59
5.2.160.0030.06015.59
5.2.150.0030.04015.59
5.2.140.0070.06015.59
5.2.130.0000.03715.59
5.2.120.0030.04715.59
5.2.110.0000.05015.59
5.2.100.0000.04315.59
5.2.90.0030.05015.59
5.2.80.0000.02715.59
5.2.70.0000.04715.59
5.2.60.0070.02315.59
5.2.50.0030.06015.59
5.2.40.0030.02315.59
5.2.30.0030.05315.59
5.2.20.0000.05015.59
5.2.10.0030.04715.59
5.2.00.0000.02315.59
5.1.60.0000.02015.59
5.1.50.0030.01715.59
5.1.40.0030.05315.59
5.1.30.0030.05015.59
5.1.20.0030.05715.59
5.1.10.0030.04715.59
5.1.00.0000.05315.59
5.0.50.0000.03015.59
5.0.40.0070.03715.59
5.0.30.0000.06715.59
5.0.20.0030.02015.59
5.0.10.0030.01715.59
5.0.00.0000.02715.59
4.4.90.0000.01315.59
4.4.80.0000.02715.59
4.4.70.0000.02715.59
4.4.60.0030.02315.59
4.4.50.0030.03315.59
4.4.40.0000.04315.59
4.4.30.0000.01315.59
4.4.20.0000.02715.59
4.4.10.0000.02715.59
4.4.00.0000.02015.59
4.3.110.0000.01315.59
4.3.100.0000.03715.59
4.3.90.0000.03315.59
4.3.80.0000.02315.59
4.3.70.0000.01315.59
4.3.60.0030.03015.59
4.3.50.0000.02015.59
4.3.40.0000.04715.59
4.3.30.0000.01315.59
4.3.20.0030.01015.59
4.3.10.0030.03015.59
4.3.00.0000.01315.59

preferences:
63.13 ms | 401 KiB | 5 Q