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); } public function __call($method, $args) { echo "non static"; var_dump($method, $args); } public static function __callStatic($method, $args) { echo " static"; var_dump($method, $args); } } $test = new Test; $test->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.0100.00716.63
8.3.50.0100.00622.00
8.3.40.0210.00018.63
8.3.30.0070.00718.96
8.3.20.0050.00320.30
8.3.10.0060.00323.66
8.3.00.0050.00319.38
8.2.180.0140.00416.38
8.2.170.0120.00822.96
8.2.160.0140.00020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.24
8.2.110.0050.00520.52
8.2.100.0080.00417.78
8.2.90.0040.00418.99
8.2.80.0040.00417.97
8.2.70.0090.00017.38
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0050.00317.90
8.2.20.0080.00017.53
8.2.10.0040.00417.97
8.2.00.0030.00517.73
8.1.280.0090.00625.92
8.1.270.0030.00523.91
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.77
8.1.230.0110.00020.98
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0040.00417.23
8.1.190.0000.00816.99
8.1.180.0030.00718.10
8.1.170.0000.00918.44
8.1.160.0080.00021.93
8.1.150.0000.00918.52
8.1.140.0040.00417.32
8.1.130.0000.00717.82
8.1.120.0040.00417.39
8.1.110.0000.00717.46
8.1.100.0000.00817.39
8.1.90.0000.00717.40
8.1.80.0080.00017.38
8.1.70.0070.00017.37
8.1.60.0030.00617.59
8.1.50.0040.00417.46
8.1.40.0040.00417.50
8.1.30.0000.00817.63
8.1.20.0030.00617.69
8.1.10.0040.00417.54
8.1.00.0040.00417.51
8.0.300.0000.00818.77
8.0.290.0060.00316.75
8.0.280.0050.00218.36
8.0.270.0080.00017.29
8.0.260.0000.00617.17
8.0.250.0030.00316.82
8.0.240.0000.00616.77
8.0.230.0030.00316.88
8.0.220.0040.00416.77
8.0.210.0050.00316.79
8.0.200.0060.00016.90
8.0.190.0040.00416.84
8.0.180.0040.00416.83
8.0.170.0000.00816.75
8.0.160.0000.00716.86
8.0.150.0070.00016.75
8.0.140.0000.00716.75
8.0.130.0000.00613.18
8.0.120.0030.00516.68
8.0.110.0000.00816.73
8.0.100.0040.00416.70
8.0.90.0000.00716.93
8.0.80.0140.00716.83
8.0.70.0000.00716.86
8.0.60.0040.00416.79
8.0.50.0030.00516.71
8.0.30.0120.00917.06
8.0.20.0130.00817.40
8.0.10.0040.00416.89
8.0.00.0090.00816.65
7.4.330.0060.00015.00
7.4.320.0000.00716.54
7.4.300.0060.00016.50
7.4.290.0030.00316.63
7.4.280.0030.00516.53
7.4.270.0000.00716.57
7.4.260.0070.00016.55
7.4.250.0040.00416.58
7.4.240.0020.00516.59
7.4.230.0030.00316.45
7.4.220.0090.00916.55
7.4.210.0060.01416.54
7.4.200.0000.00816.66
7.4.190.0000.00716.73
7.4.160.0110.00716.38
7.4.150.0060.01217.40
7.4.140.0160.00217.86
7.4.130.0110.00616.56
7.4.120.0110.00716.57
7.4.110.0070.01016.54
7.4.100.0070.01116.38
7.4.90.0080.01016.45
7.4.80.0120.00619.39
7.4.70.0090.00816.45
7.4.60.0060.01016.35
7.4.50.0080.00016.35
7.4.40.0060.02116.25
7.4.30.0130.00316.45
7.4.00.0040.01215.23
7.3.330.0050.00313.10
7.3.320.0000.00513.16
7.3.310.0040.00416.08
7.3.300.0000.00716.28
7.3.290.0000.01816.28
7.3.280.0070.01116.21
7.3.270.0110.00717.40
7.3.260.0150.00316.34
7.3.250.0060.01416.40
7.3.240.0060.01116.27
7.3.230.0120.00416.39
7.3.210.0070.01016.36
7.3.200.0060.01519.39
7.3.190.0130.00916.33
7.3.180.0080.00816.39
7.3.170.0070.01016.27
7.3.160.0150.00016.11
7.3.120.0090.00614.91
7.3.10.0100.00316.61
7.3.00.0110.00316.20
7.2.330.0140.01116.35
7.2.320.0030.01416.86
7.2.310.0050.01316.64
7.2.300.0050.01016.39
7.2.290.0120.00916.61
7.2.130.0080.00816.75
7.2.120.0000.01117.00
7.2.110.0040.00816.86
7.2.100.0030.00916.91
7.2.90.0040.00817.07
7.2.80.0070.01016.94
7.2.70.0070.00716.89
7.2.60.0050.01017.10
7.2.50.0070.00316.68
7.2.40.0040.01116.77
7.2.30.0030.01016.86
7.2.20.0090.00616.95
7.2.10.0100.00316.66
7.2.00.0000.00916.71
7.1.250.0060.00615.61
7.1.200.0070.00415.67
7.1.70.0060.00917.31
7.1.60.0070.01019.46
7.1.50.0130.00916.93
7.1.00.0030.07722.43
7.0.200.6040.00016.50
7.0.140.0030.07322.09
7.0.60.0030.08319.86
7.0.50.0170.06717.95
7.0.40.0070.08720.20
7.0.30.0330.07720.21
7.0.20.0400.05720.33
7.0.10.0030.08020.10
7.0.00.0100.08720.20
5.6.280.0030.07321.13
5.6.210.0070.06320.51
5.6.200.0070.03718.27
5.6.190.0030.05720.41
5.6.180.0170.04020.48
5.6.170.0170.06720.44
5.6.160.0170.07720.66
5.6.150.0070.04318.23
5.6.140.0000.04718.12
5.6.130.0100.07018.27
5.6.120.0100.06320.97
5.6.110.0100.08021.02
5.6.100.0000.08320.98
5.6.90.0070.08021.03
5.6.80.0000.04020.45
5.5.350.4200.03720.32
5.5.340.0100.07717.96
5.5.330.0070.05320.37
5.5.320.0270.08020.20
5.5.310.0230.08720.32
5.5.300.0030.04718.09
5.5.290.0170.06017.97
5.5.280.0070.04320.70
5.5.270.0030.08720.80
5.5.260.0030.05320.77
5.5.250.0170.08020.71
5.5.240.0000.08020.28
5.4.450.0030.07019.64
5.4.440.0270.05319.47
5.4.430.0300.06719.47
5.4.420.0230.05019.58
5.4.410.0230.05019.34
5.4.400.0330.05719.06
5.4.390.0170.06019.15
5.4.380.0200.04718.77
5.4.370.0130.05018.78
5.4.360.0200.05018.70
5.4.350.0170.05018.77
5.4.340.0200.04718.48
5.4.320.0050.03812.51
5.4.310.0100.03412.50
5.4.300.0060.03812.50
5.4.290.0160.09412.49
5.4.280.0110.06412.38
5.4.270.0190.05112.38
5.4.260.0110.06412.38
5.4.250.0140.07412.38
5.4.240.0240.06412.39
5.4.230.0250.06912.38
5.4.220.0340.06912.38
5.4.210.0200.06112.37
5.4.200.0110.05112.38
5.4.190.0190.10112.38
5.4.180.0130.05612.37
5.4.170.0200.07612.38
5.4.160.0160.05612.38
5.4.150.0140.07512.37
5.4.140.0170.08512.06
5.4.130.0160.06112.05
5.4.120.0100.04212.00
5.4.110.0100.03712.00
5.4.100.0070.04612.00
5.4.90.0150.08212.00
5.4.80.0240.07112.00
5.4.70.0100.05612.00
5.4.60.0020.04311.99
5.4.50.0070.04712.00
5.4.40.0110.04411.98
5.4.30.0120.07911.98
5.4.20.0110.06711.98
5.4.10.0170.07811.98
5.4.00.0080.05111.47
5.3.290.0040.04512.80
5.3.280.0070.05312.71
5.3.270.0160.10712.72
5.3.260.0130.06712.72
5.3.250.0290.08212.72
5.3.240.0250.06712.72
5.3.230.0170.06412.71
5.3.220.0190.06712.68
5.3.210.0140.06712.68
5.3.200.0160.07112.68
5.3.190.0070.04512.68
5.3.180.0090.03912.67
5.3.170.0070.04312.67
5.3.160.0150.04612.67
5.3.150.0110.04012.68
5.3.140.0060.04212.66
5.3.130.0100.04112.66
5.3.120.0090.04812.66
5.3.110.0090.04512.66
5.3.100.0060.04612.13
5.3.90.0120.04412.11
5.3.80.0070.04412.10
5.3.70.0090.04112.10
5.3.60.0130.07012.09
5.3.50.0120.08412.03
5.3.40.0060.04112.03
5.3.30.0090.03611.99
5.3.20.0090.03811.77
5.3.10.0080.10611.74
5.3.00.0190.08211.72
5.2.170.0090.0369.22
5.2.160.0180.0549.23
5.2.150.0100.0499.23
5.2.140.0090.0439.22
5.2.130.0090.0349.18
5.2.120.0050.0309.18
5.2.110.0150.0579.19
5.2.100.0250.0569.18
5.2.90.0230.0659.18
5.2.80.0130.0549.18
5.2.70.0190.0859.18
5.2.60.0120.0589.13
5.2.50.0120.0629.10
5.2.40.0120.0569.07
5.2.30.0090.0449.05
5.2.20.0070.0359.04
5.2.10.0060.0308.95
5.2.00.0120.0558.81
5.1.60.0260.0418.10
5.1.50.0130.0768.09
5.1.40.0100.0358.08
5.1.30.0160.0468.42
5.1.20.0170.0518.45
5.1.10.0070.0378.17
5.1.00.0280.0818.17
5.0.50.0120.0406.64
5.0.40.0060.0236.50
5.0.30.0100.0536.32
5.0.20.0110.0346.29
5.0.10.0110.0266.26
5.0.00.0080.0346.25
4.4.90.0050.0194.78
4.4.80.0060.0184.75
4.4.70.0050.0184.75
4.4.60.0020.0194.75
4.4.50.0060.0164.77
4.4.40.0020.0304.71
4.4.30.0050.0164.76
4.4.20.0030.0204.84
4.4.10.0030.0184.85
4.4.00.0100.0334.76
4.3.110.0030.0504.67
4.3.100.0030.0174.66
4.3.90.0060.0144.64
4.3.80.0050.0254.58
4.3.70.0020.0184.63
4.3.60.0030.0174.63
4.3.50.0080.0174.63
4.3.40.0020.0274.54
4.3.30.0050.0163.30
4.3.20.0050.0253.28
4.3.10.0030.0513.24
4.3.00.0000.0277.54

preferences:
60.19 ms | 400 KiB | 5 Q