3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $baz = 1; public static function foo() { echo "foo\n"; } public function bar() { echo "bar\n"; $this->foo(); $this::foo(); self::foo(); self::baz(); } public function baz() { printf("baz = %d\n", $this->baz); } } $test = new Test; Test::foo(); $test->foo();

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.70.0040.01116.38
8.3.60.0080.01118.52
8.3.50.0120.00521.92
8.3.40.0100.00718.69
8.3.30.0100.01020.40
8.3.20.0050.00320.20
8.3.10.0000.00822.10
8.3.00.0110.00422.38
8.2.180.0120.00918.41
8.2.170.0150.00422.96
8.2.160.0070.00720.29
8.2.150.0060.00324.18
8.2.140.0130.00724.66
8.2.130.0080.00326.16
8.2.120.0040.00719.68
8.2.110.0090.00022.21
8.2.100.0000.01119.14
8.2.90.0060.00319.22
8.2.80.0040.00419.47
8.2.70.0050.00317.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0050.00318.03
8.2.30.0050.00319.72
8.2.20.0000.00717.59
8.2.10.0050.00317.62
8.2.00.0040.00417.60
8.1.280.0140.00725.92
8.1.270.0040.00420.25
8.1.260.0120.00326.35
8.1.250.0050.00328.09
8.1.240.0040.00423.77
8.1.230.0050.00519.15
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.41
8.1.180.0000.00720.11
8.1.170.0080.00018.39
8.1.160.0050.00522.14
8.1.150.0040.00418.56
8.1.140.0040.00417.43
8.1.130.0030.00317.81
8.1.120.0040.00417.34
8.1.110.0040.00417.37
8.1.100.0040.00417.43
8.1.90.0000.00717.45
8.1.80.0000.00717.37
8.1.70.0000.00717.33
8.1.60.0040.00417.59
8.1.50.0000.00817.50
8.1.40.0040.00417.53
8.1.30.0000.00917.49
8.1.20.0050.00317.57
8.1.10.0070.00017.58
8.1.00.0040.00417.46
8.0.300.0040.00318.77
8.0.290.0000.00717.18
8.0.280.0030.00318.45
8.0.270.0030.00317.30
8.0.260.0000.00616.81
8.0.250.0030.00316.79
8.0.240.0030.00516.85
8.0.230.0000.00716.84
8.0.220.0070.00016.74
8.0.210.0030.00316.73
8.0.200.0000.00716.90
8.0.190.0000.00816.75
8.0.180.0040.00416.82
8.0.170.0040.00416.91
8.0.160.0040.00416.80
8.0.150.0040.00416.65
8.0.140.0030.00616.86
8.0.130.0000.00613.19
8.0.120.0070.00316.76
8.0.110.0000.00816.72
8.0.100.0050.00216.72
8.0.90.0050.00316.68
8.0.80.0110.00416.88
8.0.70.0040.00416.95
8.0.60.0050.00316.87
8.0.50.0030.00416.82
8.0.30.0120.00616.84
8.0.20.0120.00617.41
8.0.10.0040.00416.84
8.0.00.0120.00816.55
7.4.330.0000.00615.00
7.4.320.0000.00716.38
7.4.300.0030.00316.62
7.4.290.0100.00016.43
7.4.280.0040.00416.59
7.4.270.0070.00016.47
7.4.260.0030.00716.48
7.4.250.0030.00516.48
7.4.240.0020.00516.45
7.4.230.0040.00416.34
7.4.220.0170.00016.45
7.4.210.0100.00616.59
7.4.200.0000.00716.51
7.4.190.0000.00716.59
7.4.160.0100.00616.42
7.4.150.0120.00617.40
7.4.140.0080.00917.86
7.4.130.0120.00916.49
7.4.120.0160.00516.56
7.4.110.0060.01216.77
7.4.100.0000.01816.39
7.4.90.0110.00716.42
7.4.80.0160.00019.39
7.4.70.0140.00516.46
7.4.60.0130.00316.48
7.4.50.0080.00016.46
7.4.40.0070.00722.77
7.4.30.0060.01216.54
7.4.00.0060.00614.96
7.3.330.0050.00013.26
7.3.320.0050.00013.06
7.3.310.0000.00716.29
7.3.300.0000.00716.25
7.3.290.0040.01116.24
7.3.280.0060.01216.22
7.3.270.0100.00717.40
7.3.260.0100.01016.24
7.3.250.0080.00816.46
7.3.240.0140.00316.25
7.3.230.0140.00316.39
7.3.210.0160.00816.38
7.3.200.0090.01219.39
7.3.190.0090.01316.15
7.3.180.0040.01616.46
7.3.170.0060.00916.42
7.3.160.0090.00616.21
7.3.120.0060.01014.74
7.2.330.0000.01816.68
7.2.320.0160.00316.38
7.2.310.0060.00916.64
7.2.300.0110.01216.33
7.2.290.0070.01016.40
7.2.00.0030.01219.16
7.1.100.0110.00718.24
7.1.70.0000.00717.07
7.1.60.0140.01019.50
7.1.50.0040.00816.89
7.1.00.0000.07022.48
7.0.200.0030.01216.66
7.0.140.0070.07022.16
7.0.60.0370.07020.07
7.0.50.0170.07017.88
7.0.40.0130.08020.18
7.0.30.0200.04020.21
7.0.20.0300.05020.08
7.0.10.0030.09020.24
7.0.00.0070.09020.32
5.6.280.0070.06721.08
5.6.210.0070.08020.66
5.6.200.0030.04318.18
5.6.190.0000.08720.52
5.6.180.0170.05720.77
5.6.170.0370.04320.48
5.6.160.0070.08320.61
5.6.150.0030.08718.15
5.6.140.0100.07018.22
5.6.130.0030.07718.28
5.6.120.0100.08720.97
5.6.110.0030.09720.98
5.6.100.0070.06721.04
5.6.90.0030.09021.00
5.6.80.0070.07720.41
5.5.350.0230.06720.54
5.5.340.0030.08717.94
5.5.330.0030.09020.37
5.5.320.0300.05720.22
5.5.310.0230.07720.36
5.5.300.0100.06318.04
5.5.290.0170.07718.08
5.5.280.0030.05320.78
5.5.270.0030.08020.76
5.5.260.0230.06720.65
5.5.250.0170.07320.62
5.5.240.0130.06720.17
5.4.450.0270.07719.38
5.4.440.0230.06719.39
5.4.430.0230.05319.47
5.4.420.0330.07319.42
5.4.410.0270.05319.29
5.4.400.0300.04019.32
5.4.390.0230.05018.95
5.4.380.0230.06318.94
5.4.370.0330.06018.91
5.4.360.0200.04719.16
5.4.350.0270.05019.23
5.4.340.0300.05019.24
5.4.320.0200.06318.99
5.4.310.0400.07018.95
5.4.300.0400.06319.24
5.4.290.0270.08019.31
5.4.280.0230.07719.08
5.4.270.0270.06718.99
5.4.260.0330.06019.06
5.4.250.0200.04319.16
5.4.240.0230.04019.08
5.4.230.0270.03019.13
5.4.220.0230.04719.19
5.4.210.0230.04019.23
5.4.200.0230.05319.10
5.4.190.0230.04719.12
5.4.180.0270.07018.93
5.4.170.0270.03719.21
5.4.160.0170.04718.96
5.4.150.0270.04019.22
5.4.140.0330.04316.50
5.4.130.0270.04716.45
5.4.120.0200.06016.37
5.4.110.0270.06316.54
5.4.100.0330.06316.51
5.4.90.0300.04316.56
5.4.80.0200.04316.44
5.4.70.0270.06716.58
5.4.60.0230.04716.43
5.4.50.0270.07016.56
5.4.40.0300.04316.52
5.4.30.0330.05016.32
5.4.20.0330.05716.25
5.4.10.0300.05016.53
5.4.00.0470.04715.78
5.3.290.0200.04314.68
5.3.280.0430.05314.52
5.3.270.0270.03314.69
5.3.260.0270.03714.51
5.3.250.0300.04314.72
5.3.240.0200.08014.61
5.3.230.0270.03714.62
5.3.220.0270.03714.82
5.3.210.0170.06714.58
5.3.200.0230.07014.58
5.3.190.0330.05714.66
5.3.180.0270.03314.48
5.3.170.0300.04014.56
5.3.160.0300.03314.73
5.3.150.0270.08314.64
5.3.140.0270.06314.46
5.3.130.0230.04314.56
5.3.120.0170.04714.77
5.3.110.0200.07714.52
5.3.100.0370.07014.14
5.3.90.0270.05314.10
5.3.80.0230.05314.04
5.3.70.0270.03313.95
5.3.60.0200.04713.93
5.3.50.0300.05313.87
5.3.40.0330.06313.85
5.3.30.0200.07314.03
5.3.20.0300.06713.82
5.3.10.0330.05713.56
5.3.00.0200.05313.87
5.2.170.0370.04312.10
5.2.160.0200.03012.10
5.2.150.0200.04312.10
5.2.140.0200.04312.10
5.2.130.0230.05312.10
5.2.120.0270.05312.10
5.2.110.0200.05712.10
5.2.100.0200.02712.10
5.2.90.0230.06312.10
5.2.80.0270.03012.10
5.2.70.0170.06012.10
5.2.60.0200.05712.10
5.2.50.0300.05012.10
5.2.40.0100.06312.10
5.2.30.0170.04712.10
5.2.20.0230.03012.10
5.2.10.0170.02712.10
5.2.00.0200.06012.10
5.1.60.0200.02712.10
5.1.50.0230.04712.10
5.1.40.0200.05012.10
5.1.30.0300.04712.10
5.1.20.0200.04012.10
5.1.10.0130.04012.10
5.1.00.0200.04712.10
5.0.50.0100.03712.10
5.0.40.0100.04712.10
5.0.30.0130.05312.10
5.0.20.0230.01712.10
5.0.10.0170.03712.10
5.0.00.0100.05312.10
4.4.90.0070.03712.10
4.4.80.0130.02712.10
4.4.70.0070.04012.10
4.4.60.0100.03312.10
4.4.50.0070.02012.10
4.4.40.0300.01712.10
4.4.30.0130.03312.10
4.4.20.0230.01312.10
4.4.10.0100.04012.10
4.4.00.0130.05012.10
4.3.110.0100.03312.10
4.3.100.0070.02012.10
4.3.90.0170.02712.10
4.3.80.0100.05312.10
4.3.70.0130.02312.10
4.3.60.0130.01712.10
4.3.50.0070.02012.10
4.3.40.0130.04712.10
4.3.30.0030.03012.10
4.3.20.0100.03312.10
4.3.10.0100.03012.10
4.3.00.0070.03312.10

preferences:
38.49 ms | 401 KiB | 5 Q