3v4l.org

run code in 300+ PHP versions simultaneously
<?php // parent class class Vehicle { // private property name private $name; // public function start public function start() { echo $this->name. " - Engine start...<br/>"; } // public function stop public function stop() { echo $this->name. " - Engine stop...<br/>"; } } // child class class Car extends Vehicle { public function drive() { // accessing name variable of Car class echo "I am " . $this->name . "<br/>"; echo "Lets go on a drive..."; } } $car = new Car(); $car->name = "Mercedes benz"; var_dump($car);

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.1.100.0000.00717.31
8.1.90.0050.00217.42
8.1.80.0000.00717.39
8.1.70.0000.00717.37
8.1.60.0000.00817.61
8.1.50.0040.00417.40
8.1.40.0040.00417.46
8.1.30.0050.00317.63
8.1.20.0000.00817.55
8.1.10.0040.00417.43
8.1.00.0020.00517.47
8.0.230.0040.00416.93
8.0.220.0040.00416.86
8.0.210.0060.00316.82
8.0.200.0000.00716.76
8.0.190.0000.00716.86
8.0.180.0040.00416.86
8.0.170.0000.00816.73
8.0.160.0040.00416.95
8.0.150.0070.00016.73
8.0.140.0070.00016.82
8.0.130.0030.00313.22
8.0.120.0040.00416.84
8.0.110.0040.00416.87
8.0.100.0080.00016.80
8.0.90.0000.00716.79
8.0.80.0100.00516.77
8.0.70.0040.00416.90
8.0.60.0000.00816.88
8.0.50.0040.00416.89
8.0.30.0080.00816.98
8.0.20.0090.00817.03
8.0.10.0000.00716.85
8.0.00.0070.01116.53
7.4.300.0060.00016.53
7.4.290.0070.00316.47
7.4.280.0040.00416.41
7.4.270.0080.00016.40
7.4.260.0000.00513.20
7.4.250.0000.00716.54
7.4.240.0000.00716.55
7.4.230.0030.00316.57
7.4.220.0040.00416.53
7.4.210.0110.00816.53
7.4.200.0040.00416.57
7.4.130.0030.01416.55
7.4.120.0120.00616.25
7.4.110.0120.00616.32
7.4.100.0120.00616.45
7.4.90.0040.02016.42
7.4.80.0060.01316.46
7.4.70.0120.00416.28
7.4.60.0110.00816.44
7.4.50.0140.01016.22
7.4.40.0090.01216.49
7.4.30.0100.01016.24
7.4.20.0050.01516.46
7.4.10.0180.01116.32
7.4.00.0160.00916.36
7.3.330.0090.00016.12
7.3.320.0060.00013.09
7.3.310.0040.00416.34
7.3.300.0000.00716.24
7.3.290.0070.01016.29
7.3.260.0100.00716.48
7.3.250.0140.00716.40
7.3.240.0150.00516.36
7.3.230.0130.00316.29
7.3.220.0120.01216.26
7.3.210.0130.00316.19
7.3.200.0120.00416.28
7.3.190.0180.00016.21
7.3.180.0090.01516.38
7.3.170.0170.00316.44
7.3.160.0070.01416.24
7.3.150.0040.02116.45
7.3.140.0090.01216.36
7.3.130.0110.01116.54
7.3.120.0140.00716.41
7.3.110.0110.01116.21
7.3.100.0080.01516.36
7.3.90.0030.01716.41
7.3.80.0070.01516.39
7.3.70.0120.01016.23
7.3.60.0120.00816.35
7.3.50.0060.01816.30
7.3.40.0190.00616.39
7.3.30.0180.00316.09
7.3.20.0090.01216.21
7.3.10.0190.00416.24
7.3.00.0190.00816.14
7.2.340.0140.00516.49
7.2.330.0090.00916.32
7.2.320.0040.01316.70
7.2.310.0150.01216.30
7.2.300.0100.01016.25
7.2.290.0150.00416.27
7.2.280.0130.00816.35
7.2.270.0120.01216.43
7.2.260.0190.00816.65
7.2.250.0090.01416.31
7.2.240.0130.01016.53
7.2.230.0180.00916.43
7.2.220.0080.01416.60
7.2.210.0140.01116.52
7.2.200.0110.01216.43
7.2.190.0130.00716.54
7.2.180.0150.01216.53
7.2.170.0060.01616.52
7.2.160.0170.00316.61
7.2.150.0130.01016.34
7.2.140.0090.01116.48
7.2.130.0140.01116.62
7.2.120.0030.01616.63
7.2.110.0150.00716.55
7.2.100.0220.00316.54
7.2.90.0180.00716.70
7.2.80.0180.00916.59
7.2.70.0050.01716.63
7.2.60.0080.01216.45
7.2.50.0150.00616.61
7.2.40.0120.00916.49
7.2.30.0130.00616.59
7.2.20.0140.00716.56
7.2.10.0030.01716.45
7.2.00.0160.00616.57

preferences:
11.66 ms | 406 KiB | 5 Q