3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ var $name; function __construct( string $name){ $this->name = 'David'; } } class Student extends Person{ function __construct(string $name){ $this->name = $name; } } $ob2 = new Student("Peter"); echo $ob2->name;

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.4.130.0070.00517.90
8.4.120.0140.00620.29
8.4.110.0100.01022.16
8.4.100.0150.00618.75
8.4.90.0130.00618.66
8.4.80.0090.00618.96
8.4.70.0120.00717.84
8.4.60.0120.00818.78
8.4.50.0110.00918.55
8.4.40.0120.00623.73
8.4.30.0080.00818.92
8.4.20.0130.00620.49
8.4.10.0070.00323.88
8.3.260.0160.00416.48
8.3.250.0090.00819.02
8.3.240.0080.01117.21
8.3.230.0130.00616.53
8.3.220.0070.00119.14
8.3.210.0080.00616.40
8.3.200.0030.00616.62
8.3.190.0090.01117.16
8.3.180.0120.00816.36
8.3.170.0080.01120.70
8.3.160.0070.00017.17
8.3.150.0140.00419.13
8.3.140.0000.00816.78
8.3.130.0030.00616.91
8.3.120.0080.00020.63
8.3.110.0040.00718.21
8.3.100.0030.00918.55
8.3.90.0060.00826.77
8.3.80.0000.01418.55
8.3.70.0170.00316.75
8.3.60.0130.00618.30
8.3.50.0110.00416.46
8.3.40.0030.01021.98
8.3.30.0120.00318.59
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0030.00626.16
8.2.290.0070.00820.31
8.2.280.0080.01118.26
8.2.270.0100.01022.50
8.2.260.0110.00716.64
8.2.250.0000.00816.67
8.2.240.0030.00517.18
8.2.230.0040.00420.94
8.2.220.0000.00924.06
8.2.210.0090.00426.77
8.2.200.0030.00618.67
8.2.190.0110.00416.58
8.2.180.0200.00325.92
8.2.170.0040.01118.75
8.2.160.0100.00722.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00426.16
8.2.110.0030.00822.24
8.2.100.0080.00417.91
8.2.90.0040.00419.17
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0000.00817.50
8.2.50.0090.00018.03
8.2.40.0000.00817.93
8.2.30.0160.00017.49
8.2.20.0050.00317.61
8.2.10.0120.00417.55
8.2.00.0090.00917.38
8.1.330.0090.00722.08
8.1.320.0150.00816.11
8.1.310.0070.01116.84
8.1.300.0140.00418.11
8.1.290.0030.00630.84
8.1.280.0150.00325.92
8.1.270.0000.00824.66
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0040.00721.00
8.1.230.0070.00417.70
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.13
8.1.190.0030.00617.11
8.1.180.0040.00718.10
8.1.170.0000.00817.62
8.1.160.0140.00317.22
8.1.150.0100.00517.21
8.1.140.0120.00517.31
8.1.130.0100.00617.23
8.1.120.0050.01017.29
8.1.110.0130.00517.42
8.1.100.0070.00717.24
8.1.90.0110.00417.40
8.1.80.0080.00817.44
8.1.70.0130.00317.38
8.1.60.0100.01017.59
8.1.50.0110.00717.42
8.1.40.0100.01017.45
8.1.30.0120.00617.64
8.1.20.0150.00617.54
8.1.10.0100.00717.43
8.1.00.0060.00617.40
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0080.00416.76
8.0.270.0080.00416.83
8.0.260.0090.00016.74
8.0.250.0120.00316.76
8.0.240.0100.00316.87
8.0.230.0100.00516.76
8.0.220.0100.00516.73
8.0.210.0070.00716.59
8.0.200.0090.00616.75
8.0.190.0120.00316.67
8.0.180.0100.00516.75
8.0.170.0120.00016.71
8.0.160.0140.00016.77
8.0.150.0090.00716.56
8.0.140.0070.00716.66
8.0.130.0100.00616.50
8.0.120.0110.00016.70
8.0.110.0000.00816.64
8.0.100.0090.00316.58
8.0.90.0080.00416.65
8.0.80.0050.00516.69
8.0.70.0100.00016.66
8.0.60.0110.00016.68
8.0.50.0070.00716.55
8.0.30.0080.00816.57
8.0.20.0100.00516.65
8.0.10.0120.00416.74

preferences:
27.63 ms | 403 KiB | 5 Q