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 ($test->)'); 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.60.0040.01118.41
8.3.50.0070.00921.09
8.3.40.0100.01018.83
8.3.30.0110.00718.65
8.3.20.0060.00318.90
8.3.10.0030.00521.21
8.3.00.0080.00023.48
8.2.180.0070.01416.50
8.2.170.0030.01222.96
8.2.160.0070.00720.32
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0070.00021.12
8.2.110.0070.00420.47
8.2.100.0030.01017.91
8.2.90.0040.00419.24
8.2.80.0050.00317.97
8.2.70.0040.00417.72
8.2.60.0090.00018.05
8.2.50.0030.00518.07
8.2.40.0000.00718.34
8.2.30.0060.00321.29
8.2.20.0080.00017.72
8.2.10.0070.00017.64
8.2.00.0040.00717.75
8.1.280.0100.00725.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.73
8.1.230.0100.00223.93
8.1.220.0000.00818.77
8.1.210.0040.00419.04
8.1.200.0090.00017.35
8.1.190.0000.00817.66
8.1.180.0030.00518.10
8.1.170.0000.00818.63
8.1.160.0040.00418.93
8.1.150.0040.00418.60
8.1.140.0040.00417.47
8.1.130.0040.00417.75
8.1.120.0090.00017.40
8.1.110.0050.00317.38
8.1.100.0080.00017.43
8.1.90.0000.00717.40
8.1.80.0090.00017.48
8.1.70.0070.00017.50
8.1.60.0000.00817.61
8.1.50.0000.00817.37
8.1.40.0080.00017.53
8.1.30.0030.00617.64
8.1.20.0050.00317.68
8.1.10.0050.00217.64
8.1.00.0030.00517.55
8.0.300.0040.00419.89
8.0.290.0050.00317.18
8.0.280.0030.00318.40
8.0.270.0040.00417.29
8.0.260.0040.00416.84
8.0.250.0050.00216.85
8.0.240.0030.00617.00
8.0.230.0070.00016.95
8.0.220.0030.00316.79
8.0.210.0040.00416.87
8.0.200.0070.00016.96
8.0.190.0040.00416.93
8.0.180.0050.00216.88
8.0.170.0030.00516.91
8.0.160.0000.00716.82
8.0.150.0000.00816.89
8.0.140.0050.00216.78
8.0.130.0000.00513.37
8.0.120.0000.00716.90
8.0.110.0000.00716.85
8.0.100.0000.00816.88
8.0.90.0030.00517.02
8.0.80.0030.01716.96
8.0.70.0040.00416.96
8.0.60.0040.00416.91
8.0.50.0040.00416.71
8.0.30.0140.00517.13
8.0.20.0080.01117.40
8.0.10.0070.00016.94
8.0.00.0110.00816.79
7.4.330.0020.00214.66
7.4.320.0070.00016.48
7.4.300.0000.00716.48
7.4.290.0040.00416.39
7.4.280.0030.00316.43
7.4.270.0040.00416.61
7.4.260.0000.00513.27
7.4.250.0070.00016.46
7.4.240.0000.00716.62
7.4.230.0030.00316.35
7.4.220.0130.00316.44
7.4.210.0060.01016.60
7.4.200.0000.00716.60
7.4.190.0000.00716.76
7.4.160.0120.00316.38
7.4.150.0170.00317.40
7.4.140.0070.01317.86
7.4.130.0080.01016.46
7.4.120.0090.00916.47
7.4.110.0170.00016.71
7.4.100.0060.01116.45
7.4.90.0160.00416.46
7.4.80.0160.00619.39
7.4.70.0080.01116.57
7.4.60.0110.00416.32
7.4.50.0040.00416.44
7.4.40.0070.00722.52
7.4.30.0120.00616.51
7.4.00.0070.00914.94
7.3.330.0000.00513.38
7.3.320.0000.00513.23
7.3.310.0050.00316.23
7.3.300.0040.00416.38
7.3.290.0130.00316.22
7.3.280.0080.00916.27
7.3.270.0180.00417.40
7.3.260.0140.00818.24
7.3.250.0170.00216.33
7.3.240.0110.00716.28
7.3.230.0150.00716.54
7.3.210.0040.01416.56
7.3.200.0140.00519.39
7.3.190.0120.00616.53
7.3.180.0040.01216.25
7.3.170.0110.01316.37
7.3.160.0070.01016.51
7.3.120.0040.01014.80
7.3.110.0100.00814.91
7.3.100.0080.00814.90
7.3.90.0080.00814.88
7.3.80.0070.01014.93
7.3.70.0020.00714.78
7.3.60.0040.00914.84
7.3.50.0090.00714.66
7.3.40.0080.00514.68
7.3.30.0030.00914.61
7.3.20.0050.00816.70
7.3.10.0080.00716.78
7.3.00.0040.00916.38
7.2.330.0060.01216.55
7.2.320.0160.00716.58
7.2.310.0140.00316.39
7.2.300.0000.01616.61
7.2.290.0130.01016.85
7.2.250.0070.01214.97
7.2.240.0060.01415.12
7.2.230.0110.00415.05
7.2.220.0060.00615.15
7.2.210.0060.00815.24
7.2.200.0080.00614.94
7.2.190.0050.00914.99
7.2.180.0050.00914.94
7.2.170.0020.01214.96
7.1.330.0050.01115.82
7.1.320.0070.00915.76
7.1.310.0030.00815.71
7.1.300.0060.00715.84
7.1.290.0060.00815.73
7.1.280.0030.01115.70
7.1.270.0030.01015.75
7.1.260.0040.01115.84
7.1.100.0000.01118.28
7.1.70.0030.00617.22
7.1.60.0030.00719.40
7.1.50.0070.01716.60
7.1.00.0030.03322.36
7.0.200.0030.00516.86
7.0.140.0030.07321.98
7.0.70.0030.08721.80
7.0.60.0030.07021.72
7.0.50.0070.08322.03
7.0.40.0000.09020.18
7.0.30.0070.06020.04
7.0.20.0070.08719.95
7.0.10.0030.08720.05
7.0.00.0070.09020.13
5.6.220.0070.08020.66
5.6.210.0000.08320.60
5.6.200.0100.06021.04
5.6.190.0000.09020.97
5.6.180.0070.07321.17
5.6.170.0030.07721.04
5.6.160.0000.06021.18
5.6.150.0000.09021.02
5.6.140.0030.08721.05
5.6.130.0030.09020.95
5.6.120.0100.07021.07
5.6.110.0030.06021.06
5.6.100.0030.08720.95
5.6.90.0100.05021.05
5.6.80.0030.08320.43
5.6.70.0100.05320.45
5.6.60.0030.05720.44
5.6.50.0100.07020.51
5.6.40.0070.07020.33
5.6.30.0070.07320.46
5.6.20.0000.08320.39
5.6.10.0070.06720.45
5.6.00.0070.07320.37
5.5.360.0030.08320.39
5.5.350.0030.08020.40
5.5.340.0130.07720.93
5.5.330.0000.06020.66
5.5.320.0070.05320.83
5.5.310.0030.05320.84
5.5.300.0130.07320.88
5.5.290.0070.09320.74
5.5.280.0000.06720.87
5.5.270.0030.09020.64
5.5.260.0100.07720.88
5.5.250.0070.08020.73
5.5.240.0000.08020.30
5.5.230.0100.06020.14
5.5.220.0070.07320.28
5.5.210.0030.08320.26
5.5.200.0030.06320.26
5.5.190.0070.05020.11
5.5.180.0030.08720.20
5.5.160.0030.06720.27
5.5.150.0070.05320.11
5.5.140.0000.05320.13
5.5.130.0000.05020.12
5.5.120.0170.05720.27
5.5.110.0070.07320.00
5.5.100.0030.07719.97
5.5.90.0070.04719.98
5.5.80.0000.04720.05
5.5.70.0070.07020.02
5.5.60.0000.07320.07
5.5.50.0100.06320.06
5.5.40.0030.08320.06
5.5.30.0100.07720.04
5.5.20.0030.06019.96
5.5.10.0070.08020.02
5.5.00.0000.08720.12
5.4.450.0070.07019.36
5.4.440.0000.06019.33
5.4.430.0030.08019.21
5.4.420.0070.08019.37
5.4.410.0100.07019.10
5.4.400.0000.08318.88
5.4.390.0000.08319.03
5.4.380.0100.04719.12
5.4.370.0070.05019.05
5.4.360.0070.08018.95
5.4.350.0000.08319.14
5.4.340.0030.08019.21
5.4.320.0070.07719.21
5.4.310.0000.06019.16
5.4.300.0030.04719.13
5.4.290.0070.04719.12
5.4.280.0100.05019.13
5.4.270.0030.08018.95
5.4.260.0100.07019.16
5.4.250.0030.07319.04
5.4.240.0070.06719.16
5.4.230.0070.07319.12
5.4.220.0030.07019.04
5.4.210.0100.07319.12
5.4.200.0030.07719.03
5.4.190.0000.05719.19
5.4.180.0030.06719.13
5.4.170.0030.08019.14
5.4.160.0030.07319.11
5.4.150.0070.07319.10
5.4.140.0030.07316.42
5.4.130.0030.07316.40
5.4.120.0030.07016.24
5.4.110.0070.07016.36
5.4.100.0070.05016.51
5.4.90.0000.04016.42
5.4.80.0030.07316.47
5.4.70.0100.07016.49
5.4.60.0030.07716.35
5.4.50.0000.08016.45
5.4.40.0070.06716.54
5.4.30.0030.03716.46
5.4.20.0100.04016.41
5.4.10.0170.06716.46
5.4.00.0130.05015.86
5.3.290.0000.08314.61
5.3.280.0030.07314.57
5.3.270.0000.08314.68
5.3.260.0030.06314.58
5.3.250.0000.05014.62
5.3.240.0030.07714.75
5.3.230.0030.07314.53
5.3.220.0000.07714.64
5.3.210.0070.07714.64
5.3.200.0000.07314.53
5.3.190.0100.07014.57
5.3.180.0070.07014.68
5.3.170.0030.07714.49
5.3.160.0030.05714.66
5.3.150.0070.03314.70
5.3.140.0030.06314.54
5.3.130.0030.04014.57
5.3.120.0030.05714.69
5.3.110.0000.08314.54
5.3.100.0070.05014.10
5.3.90.0030.05314.04
5.3.80.0000.07014.15
5.3.70.0030.07014.16
5.3.60.0000.08014.11
5.3.50.0070.05713.96
5.3.40.0000.08314.02
5.3.30.0100.07014.00
5.3.20.0070.04713.61
5.3.10.0000.05713.56
5.3.00.0030.04713.75
5.2.170.0030.06312.19
5.2.160.0030.04012.19
5.2.150.0000.06712.19
5.2.140.0000.06012.19
5.2.130.0030.04012.19
5.2.120.0000.03712.19
5.2.110.0030.05312.19
5.2.100.0000.06712.19
5.2.90.0030.04312.19
5.2.80.0030.06012.19
5.2.70.0000.06712.19
5.2.60.0030.06012.19
5.2.50.0030.04012.19
5.2.40.0030.06012.19
5.2.30.0030.04712.19
5.2.20.0000.06312.19
5.2.10.0070.05712.19
5.2.00.0070.06312.19
5.1.60.0000.04312.19
5.1.50.0000.05312.19
5.1.40.0030.04712.19
5.1.30.0070.05312.19
5.1.20.0000.05312.19
5.1.10.0000.05012.19
5.1.00.0070.05712.19
5.0.50.0070.03312.19
5.0.40.0030.03312.19
5.0.30.0100.05312.19
5.0.20.0000.02712.19
5.0.10.0000.05012.19
5.0.00.0070.04712.19
4.4.90.0030.02312.19
4.4.80.0000.02712.19
4.4.70.0030.03712.19
4.4.60.0030.03012.19
4.4.50.0000.03712.19
4.4.40.0030.04712.19
4.4.30.0030.03312.19
4.4.20.0030.03012.19
4.4.10.0030.03312.19
4.4.00.0000.04312.19
4.3.110.0070.02712.19
4.3.100.0000.03312.19
4.3.90.0030.02012.19
4.3.80.0000.05312.19
4.3.70.0000.03712.19
4.3.60.0000.03712.19
4.3.50.0030.03012.19
4.3.40.0030.03012.19
4.3.30.0000.03312.19
4.3.20.0030.03312.19
4.3.10.0000.03012.19
4.3.00.0070.03312.19

preferences:
47.2 ms | 400 KiB | 5 Q