3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { private $model = ""; private $year = ""; private $passengers =array(); function addDetails($model,$year,$passenger) { $this->model = $model; $this->year = $year; array_push($this->passengers, $passenger); } function getDetails() { echo $this->model; echo PHP_EOL; echo $this->year; echo PHP_EOL; print_r($this->passengers); } } $herbie = new Car(); $herbie->addDetails("vw","1997","Mike"); $herbie->getDetails();

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.5.30.0100.00717.34
8.5.20.0120.00619.51
8.5.10.0100.00916.47
8.5.00.0140.00619.93
8.4.180.0130.00921.95
8.4.170.0120.01120.41
8.4.160.0210.00423.96
8.4.150.0050.00416.85
8.4.140.0150.00617.79
8.4.130.0030.00618.95
8.4.120.0110.00824.23
8.4.110.0110.00918.66
8.4.100.0140.00618.73
8.4.90.0150.00520.63
8.4.80.0060.00417.97
8.4.70.0060.00217.89
8.4.60.0110.00918.82
8.4.50.0110.01020.27
8.4.40.0130.00617.50
8.4.30.0100.01018.59
8.4.20.0130.00617.81
8.4.10.0080.00019.32
8.3.300.0140.00620.77
8.3.290.0140.00620.76
8.3.280.0120.00920.00
8.3.270.0130.00616.54
8.3.260.0040.00516.74
8.3.250.0030.00518.96
8.3.240.0100.00916.88
8.3.230.0120.00916.49
8.3.220.0090.01017.11
8.3.210.0100.00316.42
8.3.200.0040.00616.48
8.3.190.0120.00916.98
8.3.180.0120.01118.36
8.3.170.0040.00417.10
8.3.160.0030.00618.64
8.3.150.0090.00916.67
8.3.140.0060.00318.15
8.3.130.0040.00416.55
8.3.120.0040.00418.86
8.3.110.0070.00420.94
8.3.100.0030.00524.06
8.3.90.0080.00026.77
8.3.80.0090.00019.36
8.3.70.0120.00918.43
8.3.60.0150.00018.30
8.3.50.0110.00523.67
8.3.40.0030.01619.34
8.3.30.0060.01318.70
8.3.20.0040.00421.87
8.3.10.0040.00421.90
8.3.00.0090.00023.48
8.2.300.0100.01023.96
8.2.290.0090.01120.41
8.2.280.0080.01218.40
8.2.270.0110.00717.07
8.2.260.0000.00718.16
8.2.250.0070.00318.66
8.2.240.0000.00817.32
8.2.230.0120.00322.58
8.2.220.0000.00837.54
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0120.00916.58
8.2.180.0070.00716.32
8.2.170.0160.00622.96
8.2.160.0070.00721.09
8.2.150.0060.00324.18
8.2.140.0100.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0030.00721.10
8.2.100.0120.00019.45
8.2.90.0120.00019.21
8.2.80.0030.00617.97
8.2.70.0000.00817.63
8.2.60.0040.00717.93
8.2.50.0060.00318.07
8.2.40.0050.00318.16
8.2.30.0060.00317.93
8.2.20.0070.00018.05
8.2.10.0040.00419.17
8.2.00.0040.00419.18
8.1.340.0120.00817.64
8.1.330.0100.00921.86
8.1.320.0110.00916.15
8.1.310.0140.00318.64
8.1.300.0090.00918.29
8.1.290.0090.00030.84
8.1.280.0000.01625.92
8.1.270.0040.00422.03
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00420.86
8.1.230.0000.01022.13
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0000.00917.34
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0120.00018.23
8.1.160.0000.00818.87
8.1.150.0060.00618.88
8.1.140.0000.00718.82
8.1.130.0040.00419.98
8.1.120.0070.00017.45
8.1.110.0000.00817.27
8.1.100.0070.00017.44
8.1.90.0040.00417.36
8.1.80.0090.00017.42
8.1.70.0040.00417.34
8.1.60.0060.00317.49
8.1.50.0040.00417.41
8.1.40.0000.00817.55
8.1.30.0040.00417.57
8.1.20.0030.00517.53
8.1.10.0040.00417.58
8.1.00.0000.00717.42
8.0.300.0070.00018.77
8.0.290.0030.00616.75
8.0.280.0000.00718.38
8.0.270.0050.00318.00
8.0.260.0050.00318.50
8.0.250.0000.00617.00
8.0.240.0030.00616.95
8.0.230.0000.00716.88
8.0.220.0030.00316.76
8.0.210.0040.00416.73
8.0.200.0070.00016.79
8.0.190.0030.00616.89
8.0.180.0090.00016.73
8.0.170.0000.00816.77
8.0.160.0000.00716.80
8.0.150.0050.00316.76
8.0.140.0040.00416.80
8.0.130.0000.00613.27
8.0.120.0070.00016.80
8.0.110.0070.00016.82
8.0.100.0070.00016.65
8.0.90.0090.00016.63
8.0.80.0100.00816.82
8.0.70.0080.00016.88
8.0.60.0000.00716.63
8.0.50.0050.00316.86
8.0.30.0070.01016.96
8.0.20.0050.01516.96
8.0.10.0080.00016.98
8.0.00.0170.00316.82
7.4.330.0020.00215.55
7.4.320.0070.00016.43
7.4.300.0030.00316.57
7.4.290.0030.00316.54
7.4.280.0000.00716.60
7.4.270.0030.00316.42
7.4.260.0060.00013.28
7.4.250.0000.00716.57
7.4.240.0000.00716.46
7.4.230.0030.00316.44
7.4.220.0000.00716.56
7.4.210.0080.00616.53
7.4.200.0030.00316.62
7.4.130.0100.01016.59
7.4.120.0190.00416.65
7.4.110.0070.01016.42
7.4.100.0100.00716.49
7.4.90.0120.00416.32
7.4.80.0070.01019.39
7.4.70.0140.00716.39
7.4.60.0100.00616.32
7.4.50.0070.00716.51
7.4.40.0100.00716.32
7.4.30.0060.01516.37
7.4.20.0060.01516.40
7.4.10.0170.00016.23
7.4.00.0070.01116.57
7.3.330.0040.00416.12
7.3.320.0000.00713.25
7.3.310.0050.00216.10
7.3.300.0000.00616.32
7.3.290.0080.00916.21
7.3.260.0150.00316.44
7.3.230.0090.00916.42
7.3.210.0150.00616.42
7.3.200.0070.01016.22
7.3.190.0100.00616.23
7.3.180.0100.00716.29
7.3.170.0060.01216.34
7.3.160.0110.00616.40
7.3.150.0100.01016.33
7.3.140.0030.01316.31
7.3.130.0030.01316.26
7.3.120.0030.01516.09
7.3.110.0180.00016.23
7.3.100.0070.01016.54
7.3.90.0120.00916.48
7.3.80.0060.01216.34
7.3.70.0030.01416.35
7.3.60.0160.00616.27
7.3.50.0040.01216.35
7.3.40.0060.01016.38
7.3.30.0060.01016.18
7.3.20.0100.00716.27
7.3.10.0100.00716.32
7.3.00.0140.00416.16
7.2.330.0140.00916.38
7.2.320.0130.00416.71
7.2.310.0100.00716.54
7.2.300.0000.01616.69
7.2.290.0120.00616.39
7.2.280.0130.00416.77
7.2.270.0120.00616.48
7.2.260.0070.01116.73
7.2.250.0130.00316.45
7.2.240.0030.01416.82
7.2.230.0100.01016.54
7.2.220.0140.00716.86
7.2.210.0160.00416.36
7.2.200.0120.00416.50
7.2.190.0100.01316.74
7.2.180.0100.01016.38
7.2.170.0060.01016.72
7.2.160.0100.00616.61
7.2.150.0060.00916.54
7.2.140.0070.01016.75
7.2.130.0130.01016.66
7.2.120.0100.00716.68
7.2.110.0030.01316.59
7.2.100.0120.00816.57
7.2.90.0100.00716.59
7.2.80.0030.01316.56
7.2.70.0110.00516.66
7.2.60.0070.01016.48
7.2.50.0090.00916.64
7.2.40.0070.01016.55
7.2.30.0030.01316.77
7.2.20.0090.01516.78
7.2.10.0060.01216.49
7.2.00.0110.00716.56

preferences:
46.58 ms | 1485 KiB | 5 Q