3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $_count = 0; private $_number; function __construct() { $this->_number = ++static::$_count; } public function __toString(){ return static::$_count . ' | ' . $this->_number . "\n"; } public function __invoke(){ return $this->_number; } } class B { private $_status = array(); } class C { private $message; public function __construct($message){ $this->message = $message; } public static function newInstance($message){ return new C($message); } } $a = new A(); $b = new A(); $c = new A(); $d = new A(); echo $a, $b, $c, $d; echo $a(), $b(), $c(), $d();

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.0180.00718.43
8.3.50.0070.01116.61
8.3.40.0040.01118.59
8.3.30.0100.00319.18
8.3.20.0040.00420.34
8.3.10.0080.00023.48
8.3.00.0040.00419.38
8.2.180.0150.00018.18
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0000.00724.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0090.00020.47
8.2.110.0080.00021.96
8.2.100.0080.00417.75
8.2.90.0000.00819.30
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0060.00317.80
8.2.50.0000.00818.07
8.2.40.0090.00020.01
8.2.30.0000.00718.05
8.2.20.0030.00617.64
8.2.10.0050.00318.08
8.2.00.0040.00417.68
8.1.280.0140.00725.92
8.1.270.0030.00623.97
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00423.88
8.1.230.0000.01219.11
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0060.00317.23
8.1.180.0050.00218.10
8.1.170.0040.00418.50
8.1.160.0040.00422.02
8.1.150.0030.00718.91
8.1.140.0040.00417.41
8.1.130.0040.00417.85
8.1.120.0070.00017.50
8.1.110.0080.00017.44
8.1.100.0000.00717.45
8.1.90.0030.00317.42
8.1.80.0000.00717.50
8.1.70.0040.00417.37
8.1.60.0030.00617.63
8.1.50.0000.00917.53
8.1.40.0050.00317.43
8.1.30.0080.00017.67
8.1.20.0000.00717.61
8.1.10.0040.00417.50
8.1.00.0070.00017.41
8.0.300.0080.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.46
8.0.270.0070.00017.31
8.0.260.0070.00017.33
8.0.250.0040.00416.85
8.0.240.0030.00516.98
8.0.230.0000.00816.93
8.0.220.0040.00416.91
8.0.210.0000.00716.94
8.0.200.0070.00016.94
8.0.190.0080.00016.96
8.0.180.0000.00716.86
8.0.170.0040.00416.94
8.0.160.0050.00216.97
8.0.150.0000.00816.88
8.0.140.0040.00416.77
8.0.130.0030.00313.39
8.0.120.0000.00816.93
8.0.110.0070.00016.96
8.0.100.0050.00316.81
8.0.90.0000.00716.84
8.0.80.0070.01116.89
8.0.70.0070.00016.94
8.0.60.0000.00716.92
8.0.50.0040.00416.71
8.0.30.0070.01517.23
8.0.20.0140.00517.40
8.0.10.0030.00516.92
8.0.00.0110.01116.91
7.4.330.0000.00615.02
7.4.320.0040.00416.61
7.4.300.0070.00016.59
7.4.290.0070.00016.56
7.4.280.0000.00716.60
7.4.270.0000.00716.53
7.4.260.0000.00816.54
7.4.250.0030.00316.48
7.4.240.0000.00716.57
7.4.230.0070.00016.72
7.4.220.0090.00916.68
7.4.210.0070.00816.71
7.4.200.0000.00716.63
7.4.160.0060.00916.59
7.4.150.0090.00917.40
7.4.140.0070.01117.86
7.4.130.0050.01216.59
7.4.120.0130.00516.58
7.4.110.0080.01116.69
7.4.100.0030.01716.71
7.4.90.0110.00716.57
7.4.80.0030.01419.39
7.4.70.0090.00616.38
7.4.60.0090.00616.56
7.4.50.0000.00516.45
7.4.40.0070.01016.49
7.4.30.0120.00616.32
7.4.00.0070.00815.09
7.3.330.0060.00013.03
7.3.320.0000.00513.28
7.3.310.0000.00716.16
7.3.300.0040.00416.30
7.3.290.0070.00816.28
7.3.280.0060.01116.32
7.3.270.0190.00617.40
7.3.260.0100.00716.38
7.3.250.0110.00516.44
7.3.240.0100.01016.66
7.3.230.0100.00616.56
7.3.210.0120.00616.64
7.3.200.0030.01519.39
7.3.190.0040.01516.64
7.3.180.0140.00416.52
7.3.170.0080.00816.54
7.3.160.0060.00916.38
7.3.120.0030.01314.77
7.3.110.0070.01014.79
7.3.100.0130.00315.00
7.3.90.0040.01414.75
7.3.80.0070.01114.75
7.3.70.0040.00814.87
7.3.60.0060.00614.94
7.3.50.0120.00314.70
7.3.40.0110.00314.82
7.3.30.0040.00914.50
7.3.20.0080.00416.82
7.3.10.0040.01416.79
7.3.00.0030.01216.54
7.2.330.0120.00616.79
7.2.320.0070.01116.80
7.2.310.0040.01316.91
7.2.300.0070.01016.77
7.2.290.0100.00816.59
7.2.250.0060.01315.08
7.2.240.0070.01315.29
7.2.230.0060.01114.89
7.2.220.0040.01415.32
7.2.210.0100.01014.91
7.2.200.0000.01515.13
7.2.190.0120.00615.30
7.2.180.0070.00714.75
7.2.170.0070.00715.25
7.2.130.0100.00716.68
7.2.120.0110.00716.77
7.2.110.0090.00316.87
7.2.100.0030.00716.65
7.2.90.0030.01016.81
7.2.80.0030.01316.55
7.2.70.0040.00816.87
7.2.60.0060.01016.77
7.2.50.0080.00416.96
7.2.40.0030.01316.81
7.2.30.0070.00416.90
7.2.20.0100.00316.68
7.2.10.0110.00716.93
7.2.00.0070.00818.18
7.1.330.0030.01015.55
7.1.320.0070.01015.70
7.1.310.0070.01115.65
7.1.300.0070.00715.64
7.1.290.0070.01015.67
7.1.280.0110.00315.63
7.1.270.0030.01015.60
7.1.260.0150.00015.70
7.1.250.0090.00615.87
7.1.240.0070.00715.56
7.1.230.0100.00315.44
7.1.220.0130.00315.75
7.1.210.0120.00315.85
7.1.200.0000.01115.51
7.1.190.0080.00615.54
7.1.180.0080.00815.66
7.1.170.0110.00415.74
7.1.160.0100.00715.68
7.1.150.0090.00615.77
7.1.140.0030.00915.77
7.1.130.0040.00815.69
7.1.120.0070.01115.70
7.1.110.0040.01115.50
7.1.100.0060.00916.76
7.1.90.0060.00615.60
7.1.80.0080.00415.51
7.1.70.0040.00716.40
7.1.60.0090.00416.44
7.1.50.0140.00716.24
7.1.40.0030.00915.68
7.1.30.0130.00615.64
7.1.20.0100.00415.31
7.1.10.0040.01115.17
7.1.00.0080.04219.09
7.0.330.0090.00614.95
7.0.320.0110.00415.41
7.0.310.0040.01114.96
7.0.300.0120.00615.11
7.0.290.0090.00315.16
7.0.280.0070.00715.20
7.0.270.0070.00715.02
7.0.260.0070.00714.88
7.0.250.0080.00815.07
7.0.240.0080.00815.05
7.0.230.0120.00315.19
7.0.220.0070.00315.30
7.0.210.0060.00915.23
7.0.200.0080.00515.97
7.0.190.0100.00615.35
7.0.180.0090.00315.18
7.0.170.0070.00415.29
7.0.160.0110.00615.64
7.0.150.0080.00815.36
7.0.140.0040.04218.68
7.0.130.0110.00415.35
7.0.120.0040.00815.18
7.0.110.0050.04518.57
7.0.100.0080.04318.54
7.0.90.0080.03818.54
7.0.80.0090.04418.63
7.0.70.0050.03518.54
7.0.60.0050.04018.71
7.0.50.0060.04618.62
7.0.40.0060.03616.51
7.0.30.0070.04016.30
7.0.20.0020.04416.59
7.0.10.0050.03316.58
7.0.00.0050.04016.38
5.6.380.0040.00714.50
5.6.370.0000.01014.18
5.6.360.0000.01213.86
5.6.350.0050.00513.98
5.6.340.0040.00814.19
5.6.330.0030.00514.31
5.6.320.0000.00913.82
5.6.310.0000.01214.11
5.6.300.0030.00914.24
5.6.290.0060.00614.24
5.6.280.0020.04417.58
5.6.270.0050.00813.76
5.6.260.0090.04317.16
5.6.250.0030.04517.24
5.6.240.0070.04317.20
5.6.230.0120.03917.22
5.6.220.0050.04517.36
5.6.210.0070.04317.19
5.6.200.0090.04017.24
5.6.190.0020.04517.38
5.6.180.0100.04017.38
5.6.170.0080.04317.29
5.6.160.0100.03817.31
5.6.150.0040.03917.20
5.6.140.0070.04617.46
5.6.130.0050.03317.37
5.6.120.0020.03817.17
5.6.110.0090.04217.36
5.6.100.0050.04717.17
5.6.90.0090.04317.28
5.6.80.0070.04216.86
5.6.70.0020.03717.09
5.6.60.0040.04517.11
5.6.50.0060.04316.86
5.6.40.0050.03917.02
5.6.30.0030.04317.12
5.6.20.0070.04017.18
5.6.10.0130.03816.98
5.6.00.0060.04417.10
5.5.380.0060.01814.38
5.5.370.0050.04614.50
5.5.360.0040.04514.46
5.5.350.0050.02814.41
5.5.340.0060.03814.74
5.5.330.0030.04214.66
5.5.320.0060.04214.51
5.5.310.0050.04214.53
5.5.300.0020.04514.54
5.5.290.0060.03814.56
5.5.280.0010.04114.46
5.5.270.0070.04214.37
5.5.260.0000.04814.40
5.5.250.0090.03714.32
5.5.240.0020.02514.32
5.5.230.0050.04214.19
5.5.220.0060.04114.26
5.5.210.0050.03914.19
5.5.200.0050.04214.30
5.5.190.0020.03914.26
5.5.180.0060.02314.24
5.5.170.0030.00610.90
5.5.160.0030.04414.18
5.5.150.0080.04014.30
5.5.140.0100.03714.16
5.5.130.0030.04514.25
5.5.120.0020.03014.29
5.5.110.0050.02514.37
5.5.100.0040.04114.04
5.5.90.0070.04014.23
5.5.80.0080.02314.23
5.5.70.0050.04214.13
5.5.60.0060.03614.18
5.5.50.0060.04114.28
5.5.40.0030.04414.02
5.5.30.0080.03714.39
5.5.20.0030.04414.09
5.5.10.0060.02713.98
5.5.00.0040.04114.21
5.4.450.0050.04315.28
5.4.440.0050.04515.34
5.4.430.0110.03815.34
5.4.420.0070.04015.26
5.4.410.0060.04315.29
5.4.400.0020.02815.14
5.4.390.0040.04415.23
5.4.380.0090.03715.11
5.4.370.0080.04115.05
5.4.360.0110.03615.00
5.4.350.0030.02315.01
5.4.340.0080.03815.12
5.4.330.0110.00411.02
5.4.320.0120.03315.13
5.4.310.0150.03315.12
5.4.300.0050.03815.06
5.4.290.0100.02815.08
5.4.280.0090.04015.25
5.4.270.0050.04314.96
5.4.260.0040.03715.02
5.4.250.0040.04315.04
5.4.240.0090.03115.08
5.4.230.0070.03915.00
5.4.220.0090.03015.03
5.4.210.0040.02815.14
5.4.200.0090.03715.01
5.4.190.0060.03815.11
5.4.180.0060.04115.15
5.4.170.0040.03614.95
5.4.160.0060.02915.00
5.4.150.0050.04115.05
5.4.140.0070.03913.84
5.4.130.0020.04314.04
5.4.120.0050.03513.70
5.4.110.0020.04713.87
5.4.100.0030.03813.79
5.4.90.0040.02713.71
5.4.80.0020.04013.85
5.4.70.0050.02513.92
5.4.60.0050.03313.74
5.4.50.0090.03413.73
5.4.40.0060.03513.82
5.4.30.0060.02313.64
5.4.20.0020.04113.79
5.4.10.0060.03513.68
5.4.00.0060.03613.31
5.3.290.0060.04112.79
5.3.280.0090.03912.76
5.3.270.0050.04012.83
5.3.260.0120.03312.78
5.3.250.0070.04212.76
5.3.240.0060.03812.87
5.3.230.0090.04012.83
5.3.220.0090.03712.73
5.3.210.0050.03512.73
5.3.200.0070.03712.74
5.3.190.0050.02512.74
5.3.180.0140.03312.67
5.3.170.0070.02812.72
5.3.160.0050.03412.73
5.3.150.0060.04012.74
5.3.140.0070.04012.75
5.3.130.0070.03612.74
5.3.120.0070.03012.84
5.3.110.0050.03412.84
5.3.100.0030.03512.48
5.3.90.0030.03712.53
5.3.80.0030.03612.45
5.3.70.0030.03612.46
5.3.60.0030.04212.46
5.3.50.0050.03012.42
5.3.40.0020.03212.43
5.3.30.0070.03912.40
5.3.20.0030.03312.30
5.3.10.0070.03512.27
5.3.00.0030.03712.31
5.2.170.0030.02311.09
5.2.160.0020.03011.02
5.2.150.0020.01911.05
5.2.140.0070.03211.02
5.2.130.0040.01810.93
5.2.120.0030.03111.11
5.2.110.0000.03211.01
5.2.100.0030.03510.98
5.2.90.0010.02711.00
5.2.80.0040.02811.01
5.2.70.0020.03211.03
5.2.60.0030.03211.09
5.2.50.0040.02711.00
5.2.40.0000.03010.95
5.2.30.0010.03510.94
5.2.20.0010.02111.00
5.2.10.0040.02910.92
5.2.00.0040.03010.82
5.1.60.0040.01710.45
5.1.50.0000.01610.44
5.1.40.0050.02210.43
5.1.30.0030.02810.62
5.1.20.0040.02510.63
5.1.10.0050.02610.52
5.1.00.0020.03010.49
5.0.50.0020.0259.71
5.0.40.0020.0239.68
5.0.30.0000.0329.56
5.0.20.0000.0259.53
5.0.10.0050.0219.53
5.0.00.0020.0359.57
4.4.90.0050.0139.12
4.4.80.0000.0139.12
4.4.70.0030.0139.12
4.4.60.0030.0159.12
4.4.50.0000.0219.12
4.4.40.0000.0159.12
4.4.30.0050.0109.12
4.4.20.0020.0199.12
4.4.10.0030.0169.12
4.4.00.0040.0229.12
4.3.110.0020.0199.12
4.3.100.0020.0199.12
4.3.90.0030.0179.12
4.3.80.0020.0309.12
4.3.70.0030.0189.12
4.3.60.0020.0119.12
4.3.50.0040.0169.12
4.3.40.0000.0289.12
4.3.30.0030.0159.12
4.3.20.0020.0209.12
4.3.10.0020.0189.12
4.3.00.0030.0159.12

preferences:
52.03 ms | 400 KiB | 5 Q