3v4l.org

run code in 300+ PHP versions simultaneously
<?php class calc { private $state; public function __construct() { $this->state = 0; } public function add($number) { $this->state += $number; return $this; } public function mult($number) { $this->state = $this->state * $number; return $this; } public function echo() { echo $this->state; return $this; } } (new calc)->add(3)->add(7)->mult(3)->echo();

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.01016.50
8.3.50.0110.00418.28
8.3.40.0150.00018.84
8.3.30.0070.00718.70
8.3.20.0060.00320.32
8.3.10.0050.00323.66
8.3.00.0050.00319.97
8.2.180.0220.00016.46
8.2.170.0070.01022.96
8.2.160.0110.00420.39
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0000.00919.03
8.2.120.0080.00026.35
8.2.110.0030.00721.86
8.2.100.0040.00818.05
8.2.90.0000.00819.20
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0030.00522.39
8.2.30.0000.00720.54
8.2.20.0040.00417.66
8.2.10.0000.00718.16
8.2.00.0030.00518.04
8.1.280.0060.00925.92
8.1.270.0040.00420.43
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0000.00823.96
8.1.230.0070.00417.89
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00518.54
8.1.160.0040.00420.71
8.1.150.0000.00718.71
8.1.140.0040.00419.43
8.1.130.0030.00317.56
8.1.120.0000.00717.45
8.1.110.0050.00217.30
8.1.100.0040.00417.30
8.1.90.0080.00017.36
8.1.80.0000.00717.30
8.1.70.0050.00217.28
8.1.60.0040.00417.51
8.1.50.0030.00617.42
8.1.40.0080.00017.47
8.1.30.0080.00017.66
8.1.20.0040.00417.67
8.1.10.0000.00717.63
8.1.00.0040.00417.55
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.43
8.0.270.0000.00717.31
8.0.260.0040.00417.22
8.0.250.0040.00416.99
8.0.240.0000.00716.89
8.0.230.0000.00716.84
8.0.220.0040.00416.84
8.0.210.0000.00816.89
8.0.200.0030.00316.93
8.0.190.0000.00716.80
8.0.180.0040.00416.85
8.0.170.0070.00016.84
8.0.160.0000.00816.80
8.0.150.0000.00716.69
8.0.140.0030.00716.82
8.0.130.0030.00313.25
8.0.120.0030.00516.80
8.0.110.0000.00716.66
8.0.100.0040.00416.68
8.0.90.0000.00816.90
8.0.80.0030.01316.75
8.0.70.0050.00216.90
8.0.60.0000.00716.78
8.0.50.0040.00416.67
8.0.30.0130.00517.22
8.0.20.0150.01917.40
8.0.10.0040.00417.00
8.0.00.0060.01416.86
7.4.330.0050.00016.66
7.4.320.0030.00316.45
7.4.300.0040.00416.63
7.4.290.0030.00316.49
7.4.280.0050.00316.61
7.4.270.0070.00016.46
7.4.260.0070.00016.64
7.4.250.0000.00716.46
7.4.240.0030.00316.48
7.4.230.0000.00716.45
7.4.220.0120.00616.45
7.4.210.0090.00816.53
7.4.200.0000.00716.71
7.4.160.0060.00916.55
7.4.150.0100.01017.40
7.4.140.0100.01117.86
7.4.130.0140.00716.64
7.4.120.0080.00916.53
7.4.110.0070.01016.43
7.4.100.0090.00916.59
7.4.90.0130.01016.63
7.4.80.0130.01019.39
7.4.70.0150.00616.53
7.4.60.0030.01516.32
7.4.50.0100.00616.58
7.4.40.0130.00316.53
7.4.30.0140.00316.55
7.4.00.0070.01114.69
7.3.330.0030.00313.15
7.3.320.0020.00213.31
7.3.310.0000.00716.17
7.3.300.0030.00316.32
7.3.290.0070.00016.16
7.3.280.0080.01216.27
7.3.270.0070.01117.40
7.3.260.0120.00416.59
7.3.250.0070.01016.41
7.3.240.0110.00516.39
7.3.230.0140.00416.39
7.3.210.0030.01316.54
7.3.200.0090.01216.18
7.3.190.0060.01116.56
7.3.180.0110.00516.59
7.3.170.0130.00616.42
7.3.160.0100.00616.62
7.2.330.0100.00716.47
7.2.320.0130.00616.75
7.2.310.0060.01616.58
7.2.300.0070.01016.50
7.2.290.0120.00616.57
7.2.80.0070.00716.52
7.2.60.0090.00616.73
7.2.00.0040.00819.40
7.1.200.0120.00015.61
7.1.100.0030.00618.05
7.1.70.0150.00016.96
7.1.60.0100.01419.52
7.1.50.0000.01116.72
7.1.00.0100.07322.31
7.0.200.0040.00416.61
7.0.60.0100.07719.86
7.0.50.0030.08717.89
7.0.40.0100.08020.24
7.0.30.0130.06720.25
7.0.20.0400.08020.33
7.0.10.0100.08320.24
7.0.00.0100.07320.29
5.6.210.0130.06720.77
5.6.200.0030.04718.19
5.6.190.0030.09020.48
5.6.180.0230.08320.46
5.6.170.0200.04020.50
5.6.160.0030.07020.48
5.6.150.0100.03718.14
5.6.140.0030.08718.27
5.6.130.0030.05018.16
5.6.120.0100.05020.90
5.6.110.0070.07320.99
5.6.100.0170.07720.97
5.6.90.0130.05320.96
5.6.80.0130.07720.39
5.5.350.0300.05720.48
5.5.340.0030.07317.95
5.5.330.0030.04320.31
5.5.320.0130.04020.30
5.5.310.0200.03720.19
5.5.300.0030.04718.05
5.5.290.0070.04318.06
5.5.280.0130.07020.98
5.5.270.0030.04020.77
5.5.260.0030.04320.89
5.5.250.0000.06020.69
5.5.240.1470.04020.20

preferences:
54.96 ms | 400 KiB | 5 Q