3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ static $count = 0; public function __construct(){ $this->method('from constructor in object context ($this->)'); Test::method('from constructor in static context (Test::)'); self::method('from constructor in static context (self::)'); } public function __call($name, $arguments){ switch($name){ case 'method': self::magicMethod('__call() '.$arguments[0]); } } public static function __callStatic($name, $arguments){ switch($name){ case 'method': self::magicMethod('__callStatic() '.$arguments[0]); } } protected static function magicMethod($arg){ self::$count++; echo('Call '. self::$count.' : '.$arg."\n"); } protected function test(){ } } $test = new Test(); $test->method('from outside in object context ($this->)'); Test::method('from outside in static context (Test::)');

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.40.0070.00718.82
8.3.30.0040.01118.95
8.3.20.0050.00320.29
8.3.10.0080.00023.65
8.3.00.0080.00019.51
8.2.170.0150.00022.96
8.2.160.0100.00320.47
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00626.16
8.2.120.0070.00022.27
8.2.110.0040.00422.25
8.2.100.0110.00017.70
8.2.90.0060.00319.20
8.2.80.0000.00817.97
8.2.70.0090.00017.63
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0080.00021.12
8.2.30.0050.00218.08
8.2.20.0000.00717.67
8.2.10.0040.00418.04
8.2.00.0000.00717.67
8.1.270.0110.00322.09
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00423.96
8.1.230.0060.00619.15
8.1.220.0000.00917.79
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0040.00418.54
8.1.160.0040.00421.88
8.1.150.0050.00318.57
8.1.140.0050.00217.46
8.1.130.0000.00717.79
8.1.120.0000.00717.37
8.1.110.0070.00017.43
8.1.100.0000.00717.48
8.1.90.0050.00317.50
8.1.80.0050.00317.36
8.1.70.0030.00317.41
8.1.60.0040.00717.51
8.1.50.0060.00317.61
8.1.40.0040.00417.55
8.1.30.0000.00817.57
8.1.20.0040.00417.57
8.1.10.0070.00017.47
8.1.00.0050.00217.55
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0040.00418.59
8.0.270.0000.00717.27
8.0.260.0040.00416.75
8.0.250.0000.00716.98
8.0.240.0030.00316.83
8.0.230.0080.00016.86
8.0.220.0080.00016.88
8.0.210.0070.00016.96
8.0.200.0000.00716.98
8.0.190.0030.00316.88
8.0.180.0040.00416.95
8.0.170.0060.00316.98
8.0.160.0040.00317.02
8.0.150.0040.00416.87
8.0.140.0040.00416.80
8.0.130.0000.00613.32
8.0.120.0070.00016.88
8.0.110.0030.00516.72
8.0.100.0070.00016.72
8.0.90.0050.00216.86
8.0.80.0130.00616.86
8.0.70.0050.00316.95
8.0.60.0030.00617.00
8.0.50.0000.00816.79
8.0.30.0150.00817.28
8.0.20.0110.00817.40
8.0.10.0040.00417.13
8.0.00.0070.01016.78
7.4.330.0020.00215.14
7.4.320.0030.00316.52
7.4.300.0040.00416.51
7.4.290.0030.00316.59
7.4.280.0030.00316.57
7.4.270.0030.00316.43
7.4.260.0070.00016.50
7.4.250.0000.00716.56
7.4.240.0020.00616.46
7.4.230.0000.00716.70
7.4.220.0070.01116.66
7.4.210.0070.01016.61
7.4.200.0070.00016.60
7.4.190.0040.00416.72
7.4.160.0040.01216.68
7.4.150.0100.00717.40
7.4.140.0160.00517.86
7.4.130.0040.01516.38
7.4.120.0070.01116.58
7.4.110.0070.01716.64
7.4.100.0040.01816.66
7.4.90.0140.00416.60
7.4.80.0090.00919.39
7.4.70.0090.00916.46
7.4.60.0060.01016.38
7.4.50.0060.00316.21
7.4.40.0100.00722.77
7.4.30.0060.01116.39
7.4.00.0100.00914.94
7.3.330.0030.00313.15
7.3.320.0000.00613.31
7.3.310.0030.00316.36
7.3.300.0060.00016.41
7.3.290.0090.00416.29
7.3.280.0080.00916.31
7.3.270.0030.01317.40
7.3.260.0140.00716.53
7.3.250.0100.00816.53
7.3.240.0080.00816.30
7.3.230.0040.01216.39
7.3.210.0080.00816.67
7.3.200.0110.00719.39
7.3.190.0090.01216.51
7.3.180.0040.01216.28
7.3.170.0100.01016.33
7.3.160.0100.00616.43
7.3.120.0080.00914.75
7.3.110.0080.00815.03
7.3.100.0080.00814.97
7.3.90.0040.00915.02
7.3.80.0060.00914.86
7.3.70.0070.00714.70
7.3.60.0080.00614.71
7.3.50.0050.00814.92
7.3.40.0020.01314.71
7.3.30.0070.00514.70
7.3.20.0100.00416.77
7.3.10.0050.00916.66
7.3.00.0040.00916.56
7.2.330.0040.01516.88
7.2.320.0090.00916.55
7.2.310.0080.00816.65
7.2.300.0070.01016.65
7.2.290.0100.00716.82
7.2.250.0050.01615.16
7.2.240.0050.01315.37
7.2.230.0100.00415.15
7.2.220.0050.00815.02
7.2.210.0070.00714.97
7.2.200.0050.00715.09
7.2.190.0110.00515.03
7.2.180.0030.01015.01
7.2.170.0100.00514.98
7.2.130.0100.01016.47
7.2.120.0120.00316.70
7.2.110.0110.00716.53
7.2.100.0040.01116.39
7.2.90.0040.01116.99
7.2.80.0060.01017.15
7.2.70.0070.00717.00
7.2.60.0100.00617.01
7.2.50.0070.00716.71
7.2.40.0100.01016.82
7.2.30.0080.01216.87
7.2.20.0130.00716.55
7.2.10.0130.00716.54
7.2.00.0100.00316.86
7.1.330.0020.01315.84
7.1.320.0090.00215.72
7.1.310.0030.01216.01
7.1.300.0060.01015.90
7.1.290.0030.01015.92
7.1.280.0020.01315.88
7.1.270.0030.01115.80
7.1.260.0040.00915.77
7.1.250.0030.01015.30
7.1.200.0030.01215.52
7.1.70.0070.00717.09
7.1.60.0040.01819.33
7.1.50.0030.01016.92
7.1.00.0000.08022.45
7.0.200.0080.00316.80
7.0.140.0100.06722.10
7.0.100.0200.06720.03
7.0.90.0070.04019.91
7.0.80.0100.03719.92
7.0.70.0030.04019.92
7.0.60.0070.03720.02
7.0.50.0000.04720.38
7.0.40.0000.05020.18
7.0.30.0100.04720.04
7.0.20.0030.04320.07
7.0.10.0100.04320.08
7.0.00.0070.04019.95
5.6.280.0130.06721.13
5.6.250.0170.07020.64
5.6.240.0100.06320.70
5.6.230.0070.04020.68
5.6.220.0030.04020.69
5.6.210.0000.04320.63
5.6.200.0070.04720.97
5.6.190.0100.03721.18
5.6.180.0130.08321.12
5.6.170.0130.06321.13
5.6.160.0030.04321.18
5.6.150.0030.04721.09
5.6.140.0030.04321.09
5.6.130.0100.03721.12
5.6.120.0030.04320.93
5.6.110.0100.06021.18
5.6.100.0030.04021.11
5.6.90.0070.04020.93
5.6.80.0030.04020.39
5.6.70.0030.07320.41
5.6.60.0130.04720.43
5.6.50.0030.04020.41
5.6.40.0000.04320.39
5.6.30.0100.03320.42
5.6.20.0100.07320.48
5.6.10.0030.04020.39
5.6.00.0100.06720.40
5.5.380.0030.05720.38
5.5.370.0030.04020.37
5.5.360.0030.04020.50
5.5.350.0030.04320.42
5.5.340.0070.04720.82
5.5.330.0030.06020.66
5.5.320.0100.04320.88
5.5.310.0030.04320.80
5.5.300.0170.03720.84
5.5.290.0000.04720.94
5.5.280.0000.04720.84
5.5.270.0030.04020.78
5.5.260.0070.06720.78
5.5.250.0000.05020.69
5.5.240.0030.04020.23
5.5.230.0000.04320.22
5.5.220.0100.03320.18
5.5.210.0100.03320.13
5.5.200.0000.04320.20
5.5.190.0070.04020.25
5.5.180.0030.04020.28
5.5.160.0070.07020.26
5.5.150.0000.08320.28
5.5.140.0070.07320.28
5.5.130.0070.07720.20
5.5.120.0070.07320.09
5.5.110.0070.07720.26
5.5.100.0070.06720.15
5.5.90.0130.05719.96
5.5.80.0070.04020.08
5.5.70.0100.05020.11
5.5.60.0070.07720.07
5.5.50.0070.07020.10
5.5.40.0030.06720.12
5.5.30.0070.07020.11
5.5.20.0100.03720.06
5.5.10.0130.07320.04
5.5.00.0030.07720.13
5.4.450.0070.08019.23
5.4.440.0070.03719.46
5.4.430.0030.04019.20
5.4.420.0070.03719.27
5.4.410.0000.07319.23
5.4.400.0000.04019.04
5.4.390.0030.03719.13
5.4.380.0030.03719.04
5.4.370.0030.04019.23
5.4.360.0000.04718.90
5.4.350.0030.03719.05
5.4.340.0070.03719.13
5.4.320.0070.04318.89
5.4.310.0030.07718.86
5.4.300.0130.06719.13
5.4.290.0070.07319.09
5.4.280.0070.07719.09
5.4.270.0070.07319.23
5.4.260.0000.04018.90
5.4.250.0030.08019.13
5.4.240.0030.07319.03
5.4.230.0070.07019.24
5.4.220.0030.06319.12
5.4.210.0100.07319.12
5.4.200.0000.04019.15
5.4.190.0100.07018.89
5.4.180.0070.07018.88
5.4.170.0000.07019.12
5.4.160.0070.05318.83
5.4.150.0070.08019.01
5.4.140.0100.03716.44
5.4.130.0200.04016.41
5.4.120.0100.06716.40
5.4.110.0200.05716.43
5.4.100.0070.07316.43
5.4.90.0100.07016.43
5.4.80.0070.07316.45
5.4.70.0100.06716.37
5.4.60.0000.07716.30
5.4.50.0100.07016.48
5.4.40.0070.07316.55
5.4.30.0070.05716.44
5.4.20.0100.06016.36
5.4.10.0070.07316.41
5.4.00.0130.06715.95
5.3.290.0070.08014.68
5.3.280.0030.08014.67
5.3.270.0030.08014.68
5.3.260.0070.07714.59
5.3.250.0030.07014.71
5.3.240.0030.07314.68
5.3.230.0030.06014.73
5.3.220.0130.06714.50
5.3.210.0070.07714.55
5.3.200.0130.06314.51
5.3.190.0100.07714.60
5.3.180.0100.07014.53
5.3.170.0070.07014.71
5.3.160.0070.06314.64
5.3.150.0130.06714.68
5.3.140.0000.08014.59
5.3.130.0030.07714.53
5.3.120.0000.08014.51
5.3.110.0000.08014.59
5.3.100.0000.07714.17
5.3.90.0070.06014.06
5.3.80.0030.08014.07
5.3.70.0070.06314.13
5.3.60.0070.06714.15
5.3.50.0100.07013.89
5.3.40.0100.06713.84
5.3.30.0030.05313.95
5.3.20.0100.07013.68
5.3.10.0070.07013.59
5.3.00.0130.06313.59
5.2.170.0030.06011.18
5.2.160.0030.06011.09
5.2.150.0000.06711.04
5.2.140.0000.06711.27
5.2.130.0030.06311.17
5.2.120.0030.06311.01
5.2.110.0000.06711.23
5.2.100.0070.06310.98
5.2.90.0030.06311.20
5.2.80.0100.06011.02
5.2.70.0030.06310.96
5.2.60.0030.06011.17
5.2.50.0000.06311.13
5.2.40.0030.05710.95
5.2.30.0070.06310.88
5.2.20.0130.05711.06
5.2.10.0070.05710.84
5.2.00.0070.06010.77
5.1.60.0170.04310.13
5.1.50.0100.05010.09
5.1.40.0030.0409.98
5.1.30.0030.05710.22
5.1.20.0070.05310.35
5.1.10.0000.05310.17
5.1.00.0070.05310.14
5.0.50.0030.0478.64
5.0.40.0030.0478.50
5.0.30.0070.0638.25
5.0.20.0000.0438.21
5.0.10.0000.0508.18
5.0.00.0100.0608.26
4.4.90.0030.0208.00
4.4.80.0030.0378.00
4.4.70.0030.0308.00
4.4.60.0030.0378.00
4.4.50.0000.0278.00
4.4.40.0000.0408.00
4.4.30.0030.0338.00
4.4.20.0030.0308.00
4.4.10.0070.0308.00
4.4.00.0030.0508.00
4.3.110.0030.0278.00
4.3.100.0000.0378.00
4.3.90.0100.0278.00
4.3.80.0030.0538.00
4.3.70.0100.0238.00
4.3.60.0070.0308.00
4.3.50.0000.0238.00
4.3.40.0070.0478.00
4.3.30.0070.0138.00
4.3.20.0000.0408.00
4.3.10.0000.0338.00
4.3.00.0000.0338.00

preferences:
46.15 ms | 400 KiB | 5 Q