3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal { private $name = "No-name animal"; public function __construct($name) { echo "I'm alive!\n"; $this->name = $name; } public function test(){ echo "Name of the animal: " . $this->name ."\n"; } public function __destruct() { echo "I'm dead now :(\n"; } } $animal = new Animal("Bob"); $animal=null; $animal2=new Animal("cat"); $animal2->test(); ?>

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.01018.30
8.3.50.0100.00718.32
8.3.40.0090.00618.61
8.3.30.0040.01118.69
8.3.20.0030.00619.11
8.3.10.0070.00021.90
8.3.00.0080.00022.40
8.2.180.0130.00716.38
8.2.170.0190.00018.99
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0000.00824.66
8.2.130.0050.00322.26
8.2.120.0030.00526.35
8.2.110.0100.00021.07
8.2.100.0060.00617.91
8.2.90.0040.00417.78
8.2.80.0050.00318.02
8.2.70.0080.00017.37
8.2.60.0030.00717.63
8.2.50.0080.00018.07
8.2.40.0000.00818.07
8.2.30.0040.00417.99
8.2.20.0000.00717.67
8.2.10.0080.00018.10
8.2.00.0040.00417.75
8.1.280.0070.01425.92
8.1.270.0080.00023.99
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00323.98
8.1.230.0040.00721.03
8.1.220.0000.00817.76
8.1.210.0030.00618.77
8.1.200.0070.00317.47
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0080.00018.71
8.1.160.0030.00618.88
8.1.150.0000.00718.75
8.1.140.0040.00419.46
8.1.130.0040.00417.63
8.1.120.0050.00217.38
8.1.110.0000.00817.45
8.1.100.0050.00217.45
8.1.90.0000.00717.43
8.1.80.0040.00317.35
8.1.70.0040.00417.46
8.1.60.0000.00917.48
8.1.50.0040.00717.48
8.1.40.0040.00417.40
8.1.30.0030.00617.54
8.1.20.0040.00417.52
8.1.10.0040.00417.59
8.1.00.0000.00817.52
8.0.300.0050.00219.98
8.0.290.0040.00416.75
8.0.280.0040.00418.50
8.0.270.0000.01017.21
8.0.260.0070.00316.82
8.0.250.0070.00016.99
8.0.240.0040.00416.98
8.0.230.0030.00316.84
8.0.220.0050.00316.87
8.0.210.0070.00016.88
8.0.200.0030.00316.90
8.0.190.0070.00016.94
8.0.180.0000.00716.83
8.0.170.0000.00716.90
8.0.160.0030.00316.73
8.0.150.0080.00016.72
8.0.140.0000.00716.87
8.0.130.0040.00413.29
8.0.120.0040.00416.84
8.0.110.0000.00716.93
8.0.100.0000.00716.70
8.0.90.0040.00416.95
8.0.80.0080.00816.87
8.0.70.0000.00716.82
8.0.60.0040.00416.73
8.0.50.0000.00716.82
8.0.30.0080.00717.23
8.0.20.0130.00517.42
8.0.10.0040.00416.99
8.0.00.0170.00716.81
7.4.330.0000.00515.08
7.4.320.0070.00016.56
7.4.300.0000.00616.61
7.4.290.0000.00716.50
7.4.280.0050.00316.59
7.4.270.0030.00316.46
7.4.260.0000.00716.54
7.4.250.0000.00716.56
7.4.240.0070.00016.52
7.4.230.0020.00516.35
7.4.220.0130.00616.64
7.4.210.0090.00616.64
7.4.200.0000.00716.50
7.4.160.0090.00716.39
7.4.150.0130.00417.40
7.4.140.0160.00517.86
7.4.130.0100.00816.47
7.4.120.0080.00816.53
7.4.110.0170.00016.42
7.4.100.0150.00616.49
7.4.90.0090.00916.55
7.4.80.0060.01019.39
7.4.70.0030.01316.55
7.4.60.0100.00716.45
7.4.50.0110.00316.28
7.4.40.0060.01016.41
7.4.30.0070.01416.56
7.4.00.0090.00315.15
7.3.330.0050.00013.36
7.3.320.0030.00313.37
7.3.310.0000.00816.25
7.3.300.0000.00716.16
7.3.290.0100.00616.29
7.3.280.0080.01116.30
7.3.270.0110.00617.40
7.3.260.0090.00816.45
7.3.250.0090.01116.43
7.3.240.0080.00916.51
7.3.230.0100.00716.39
7.3.210.0060.01016.34
7.3.200.0080.00816.59
7.3.190.0080.00916.40
7.3.180.0060.01316.45
7.3.170.0240.01916.64
7.3.160.0150.00816.46
7.2.330.0120.00616.79
7.2.320.0120.00916.86
7.2.310.0130.00316.59
7.2.300.0060.00916.84
7.2.290.0130.00316.46
7.2.00.0080.00519.31
7.1.70.0000.00717.00
7.1.60.0100.00317.13
7.1.00.0000.08022.36
7.0.200.0190.00014.94
7.0.100.0000.06720.00
7.0.90.0170.05020.05
7.0.80.0100.05719.99
7.0.70.0300.06019.97
7.0.60.0130.05320.05
7.0.50.0100.05320.36
7.0.40.0070.06020.37
7.0.30.0070.06020.36
7.0.20.0130.05320.39
7.0.10.0200.05020.34
7.0.00.0170.05720.21
5.6.250.0170.05020.76
5.6.240.0030.06720.69
5.6.230.0100.06020.70
5.6.220.0130.05020.74
5.6.210.0100.05320.88
5.6.200.0200.04721.09
5.6.190.0070.06321.19
5.6.180.0170.05021.11
5.6.170.0000.06321.21
5.6.160.0000.06721.09
5.6.150.0130.05721.04
5.6.140.0070.06021.08
5.6.130.0200.05721.09
5.6.120.0070.06721.17
5.6.110.0070.06721.08
5.6.100.0170.06321.08
5.6.90.0170.05721.07
5.6.80.0130.06020.41
5.6.70.0130.05020.55
5.6.60.0100.05320.48
5.6.50.0130.05320.50
5.6.40.0170.07020.40
5.6.30.0130.06020.47
5.6.20.0230.06720.45
5.6.10.0170.05020.44
5.6.00.0030.06020.45

preferences:
48.54 ms | 400 KiB | 5 Q