3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Countable { public $prop1, $prop2,$prop3,$prop4=4; private $propa, $propb,$propc,$propd=44; protected $propx, $propy,$propz,$propzz=444; public function Greet() { return 'hello world'; } public function getCount() { $res = (array) $this; return count($res); } public function count() { return $this->getCount(); } } $t = new Test; echo $t->Greet(),"\n"; echo count( (array) $t),"\n"; echo $t->getCount(),"\n"; echo count($t),"\n"; echo (int) get_object_vars($t);

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.0110.00316.63
8.3.50.0100.01021.91
8.3.40.0140.00018.84
8.3.30.0100.00318.94
8.3.20.0070.00020.21
8.3.10.0050.00323.52
8.3.00.0070.00317.59
8.2.180.0090.00618.43
8.2.170.0150.00018.89
8.2.160.0180.00422.96
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00422.30
8.2.110.0060.00322.25
8.2.100.0040.00717.91
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0100.00317.63
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0050.00318.03
8.2.30.0030.00618.05
8.2.20.0030.00517.72
8.2.10.0000.00818.13
8.2.00.0000.01017.66
8.1.280.0030.01425.92
8.1.270.0040.00422.12
8.1.260.0020.00526.35
8.1.250.0050.00228.09
8.1.240.0060.00323.91
8.1.230.0060.00619.11
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0060.00317.53
8.1.180.0050.00318.10
8.1.170.0030.00618.65
8.1.160.0070.00022.02
8.1.150.0040.00418.64
8.1.140.0000.00817.32
8.1.130.0000.00817.74
8.1.120.0040.00417.44
8.1.110.0050.00217.34
8.1.100.0040.00417.45
8.1.90.0000.00717.46
8.1.80.0070.00017.51
8.1.70.0030.00317.39
8.1.60.0080.00017.58
8.1.50.0000.00817.50
8.1.40.0060.00317.46
8.1.30.0060.00317.64
8.1.20.0040.00417.58
8.1.10.0040.00417.59
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0040.00417.15
8.0.280.0000.00718.37
8.0.270.0040.00417.26
8.0.260.0000.00617.26
8.0.250.0030.00316.89
8.0.240.0030.00616.98
8.0.230.0000.00716.83
8.0.220.0070.00016.77
8.0.210.0040.00416.87
8.0.200.0030.00316.99
8.0.190.0040.00417.02
8.0.180.0040.00416.83
8.0.170.0040.00416.94
8.0.160.0030.00316.85
8.0.150.0040.00416.75
8.0.140.0000.00716.74
8.0.130.0060.00313.26
8.0.120.0040.00416.76
8.0.110.0000.00816.80
8.0.100.0000.00716.82
8.0.90.0000.00716.72
8.0.80.0100.01016.87
8.0.70.0070.00016.93
8.0.60.0000.00716.71
8.0.50.0040.00416.82
8.0.30.0090.00917.19
8.0.20.0120.00917.40
8.0.10.0040.00416.88
8.0.00.0070.01016.76
7.4.330.0030.00315.08
7.4.320.0060.00016.50
7.4.300.0070.00016.50
7.4.290.0000.00716.52
7.4.280.0070.00416.45
7.4.270.0040.00416.46
7.4.260.0070.00016.40
7.4.250.0030.00316.46
7.4.240.0000.00716.51
7.4.230.0030.00316.59
7.4.220.0200.00316.63
7.4.210.0070.00916.52
7.4.200.0070.00016.58
7.4.190.0000.00716.61
7.4.160.0080.00816.40
7.4.150.0000.01717.40
7.4.140.0100.01117.86
7.4.130.0110.00516.49
7.4.120.0110.00516.54
7.4.110.0090.00916.41
7.4.100.0180.01116.40
7.4.90.0170.00016.51
7.4.80.0120.00919.39
7.4.70.0030.01616.49
7.4.60.0180.00316.56
7.4.50.0000.00416.36
7.4.40.0050.00722.77
7.4.30.0080.00816.54
7.4.00.0060.00915.07
7.3.330.0030.00313.17
7.3.320.0000.00513.29
7.3.310.0000.00716.34
7.3.300.0030.00316.35
7.3.290.0030.01216.27
7.3.280.0080.00916.28
7.3.270.0070.01017.40
7.3.260.0090.01516.31
7.3.250.0140.00816.39
7.3.240.0140.00316.46
7.3.230.0040.01216.39
7.3.210.0080.00816.52
7.3.200.0130.01019.39
7.3.190.0150.00816.46
7.3.180.0180.00616.40
7.3.170.0090.00716.51
7.3.160.0070.01016.48
7.3.120.0090.00615.08
7.2.330.0070.01116.52
7.2.320.0100.01016.70
7.2.310.0030.01516.48
7.2.300.0160.00016.59
7.2.290.0060.00916.70
7.2.60.0110.00416.86
7.2.00.0030.00819.60
7.1.200.0170.00815.41
7.1.100.0000.01417.75
7.1.70.0110.00516.81
7.1.60.0110.01419.33
7.1.50.0120.00916.59
7.1.00.0030.07722.43
7.0.200.0000.01016.98
7.0.140.0070.07321.95
7.0.60.0070.04720.09
7.0.50.0070.08017.84
7.0.40.0030.04320.13
7.0.30.0500.07320.24
7.0.20.0300.07320.33
7.0.10.0100.04720.05
7.0.00.0000.05020.19
5.6.280.0030.07320.83
5.6.210.0200.06720.63
5.6.200.0030.04018.24
5.6.190.0100.08320.47
5.6.180.0130.04320.33
5.6.170.0270.07720.47
5.6.160.0030.09020.52
5.6.150.0070.08318.27
5.6.140.0100.07718.17
5.6.130.0030.04318.23
5.6.120.0130.06021.09
5.6.110.0100.07021.02
5.6.100.0070.08020.99
5.6.90.0030.05021.04
5.6.80.0030.04020.53
5.6.70.4400.02720.40
5.5.350.0130.08320.38
5.5.340.0070.07317.96
5.5.330.0100.07320.28
5.5.320.0100.08020.32
5.5.310.0170.05720.36
5.5.300.0070.08017.94
5.5.290.0100.07717.98
5.5.280.0100.03320.81
5.5.270.0030.09020.77
5.5.260.0030.08720.80
5.5.250.0030.09320.70
5.5.240.0170.06720.27
5.4.450.0230.06719.49
5.4.440.1000.08319.64
5.4.430.0600.06019.72
5.4.420.0400.05719.60
5.4.410.0170.05719.45
5.4.400.0830.06719.15
5.4.390.0970.05319.16
5.4.380.0230.06018.73
5.4.370.0700.05018.75
5.4.360.0270.05018.71
5.4.350.0300.05718.76
5.4.340.0270.05718.74
5.4.320.0070.03612.50
5.4.310.0060.03812.50
5.4.300.0030.04712.51
5.4.290.0100.04112.50
5.4.280.0110.03512.37
5.4.270.0070.03912.37
5.4.260.0060.04112.37
5.4.250.0070.04012.38
5.4.240.0080.04012.38
5.4.230.0070.04012.37
5.4.220.0050.04212.36
5.4.210.0090.03712.37
5.4.200.0110.03812.37
5.4.190.0090.03712.37
5.4.180.0080.04312.36
5.4.170.0090.04312.38
5.4.160.0130.04612.37
5.4.150.0140.06112.36
5.4.140.0120.05112.05
5.4.130.0200.07612.04
5.4.120.0220.07711.99
5.4.110.0100.04611.99
5.4.100.0130.04311.99
5.4.90.0120.04611.99
5.4.80.0080.05711.99
5.4.70.0120.04611.99
5.4.60.0120.04711.99
5.4.50.0140.05211.99
5.4.40.0090.04911.98
5.4.30.0150.06911.98
5.4.20.0140.04911.98
5.4.10.0080.06711.97
5.4.00.0100.04611.46
5.3.290.0070.03812.80
5.3.280.0130.05312.71
5.3.270.0170.06112.72
5.3.260.0200.08912.72
5.3.250.0100.04312.72
5.3.240.0120.03912.72
5.3.230.0130.05412.71
5.3.220.0170.07112.68
5.3.210.0140.05912.68
5.3.200.0100.04912.68
5.3.190.0120.04712.68
5.3.180.0120.05212.68
5.3.170.0080.05412.67
5.3.160.0120.05112.67
5.3.150.0110.05212.68
5.3.140.0080.05312.66
5.3.130.0100.05112.66
5.3.120.0130.05012.66
5.3.110.0150.06012.66
5.3.100.0150.04612.12
5.3.90.0080.04412.09
5.3.80.0110.04912.07
5.3.70.0150.05812.08
5.3.60.0090.05012.06
5.3.50.0130.04612.01
5.3.40.0130.04312.01
5.3.30.0080.05411.96
5.3.20.0150.04211.75
5.3.10.0120.05611.71
5.3.00.0070.06011.70
5.2.170.0100.0449.21
5.2.160.0070.0489.20
5.2.150.0080.0399.20
5.2.140.0080.0459.20
5.2.130.0070.0459.16
5.2.120.0100.0459.16
5.2.110.0110.0479.17
5.2.100.0100.0289.16
5.2.90.0090.0299.16
5.2.80.0080.0309.16
5.2.70.0080.0349.16
5.2.60.0130.0329.11
5.2.50.0070.0309.08
5.2.40.0050.0329.05
5.2.30.0050.0319.04
5.2.20.0030.0319.02
5.2.10.0050.0288.93
5.2.00.0050.0308.80
5.1.60.0050.0238.08
5.1.50.0060.0238.08
5.1.40.0020.0278.07
5.1.30.0030.0288.41
5.1.20.0030.0298.43
5.1.10.0070.0248.16
5.1.00.0020.0298.15
5.0.50.0040.0206.63
5.0.40.0020.0216.49
5.0.30.0030.0336.30
5.0.20.0030.0206.27
5.0.10.0050.0196.25
5.0.00.0030.0326.24
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0020.0174.76
4.4.60.0040.0144.75
4.4.50.0020.0164.77
4.4.40.0030.0244.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0030.0154.84
4.4.00.0020.0264.76
4.3.110.0030.0164.67
4.3.100.0030.0154.66
4.3.90.0030.0154.64
4.3.80.0030.0294.58
4.3.70.0040.0144.63
4.3.60.0040.0164.63
4.3.50.0050.0144.63
4.3.40.0020.0264.54
4.3.30.0030.0163.29
4.3.20.0030.0163.27
4.3.10.0040.0143.23
4.3.00.0070.0177.79

preferences:
36.1 ms | 401 KiB | 5 Q