3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ var $name; function __construct(string $name){ $this->name = $name; } } class Student extends Person{ public int $age; function __construct(int $age, string $name){ parent::__construct($name); $this->age = $age; } } $ob = new Student(25, "James"); echo $ob->age, " " ,$ob->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.0100.01017.66
8.4.120.0100.01020.63
8.4.110.0110.00918.74
8.4.100.0100.00917.85
8.4.90.0150.00420.28
8.4.80.0110.00819.02
8.4.70.0070.00518.99
8.4.60.0090.00620.75
8.4.50.0070.00918.60
8.4.40.0040.01524.07
8.4.30.0100.01018.95
8.4.20.0060.01318.82
8.4.10.0070.00422.27
8.3.260.0170.00216.41
8.3.250.0060.00218.88
8.3.240.0110.00816.44
8.3.230.0110.00916.73
8.3.220.0130.00619.07
8.3.210.0110.00916.73
8.3.200.0050.00416.49
8.3.190.0060.00517.15
8.3.180.0100.00720.65
8.3.170.0110.00716.84
8.3.160.0090.00917.17
8.3.150.0150.00419.00
8.3.140.0080.01219.12
8.3.130.0090.00018.51
8.3.120.0030.00719.02
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0050.00526.77
8.3.80.0000.00917.97
8.3.70.0070.01416.38
8.3.60.0000.01416.63
8.3.50.0130.01016.43
8.3.40.0160.00321.61
8.3.30.0090.00618.67
8.3.20.0050.00224.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0040.00417.09
8.2.280.0140.00618.23
8.2.270.0180.00917.74
8.2.260.0120.00616.69
8.2.250.0120.00618.34
8.2.240.0080.00018.78
8.2.230.0120.00322.58
8.2.220.0070.01337.54
8.2.210.0110.00426.77
8.2.200.0000.01116.50
8.2.190.0110.00718.09
8.2.180.0100.01016.75
8.2.170.0140.00718.91
8.2.160.0130.00722.96
8.2.150.0050.00225.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00821.05
8.2.110.0030.00621.03
8.2.100.0060.00619.63
8.2.90.0000.00817.75
8.2.80.0080.00018.77
8.2.70.0000.00817.25
8.2.60.0000.00917.63
8.2.50.0040.00418.04
8.2.40.0040.00419.73
8.2.30.0000.00817.59
8.2.20.0040.00417.50
8.2.10.0070.00317.54
8.2.00.0090.00017.52
8.1.330.0040.00516.04
8.1.320.0080.01116.11
8.1.310.0090.00616.41
8.1.300.0150.00320.40
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0080.00022.19
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00719.61
8.1.230.0130.00020.85
8.1.220.0040.00418.62
8.1.210.0000.00818.77
8.1.200.0030.00517.36
8.1.190.0060.00317.35
8.1.180.0000.00919.01
8.1.170.0070.00017.62
8.1.160.0000.00817.24
8.1.150.0050.00517.30
8.1.140.0090.00617.29
8.1.130.0040.00717.30
8.1.120.0140.00017.32
8.1.110.0100.00517.38
8.1.100.0100.00517.42
8.1.90.0090.00517.39
8.1.80.0110.00317.27
8.1.70.0100.00317.38
8.1.60.0060.00617.56
8.1.50.0040.00917.52
8.1.40.0090.00317.57
8.1.30.0100.00617.64
8.1.20.0150.00417.63
8.1.10.0110.00717.52
8.1.00.0060.01317.34
8.0.300.0000.00918.77
8.0.290.0100.00017.15
8.0.280.0110.00316.79
8.0.270.0120.00316.81
8.0.260.0090.00616.56
8.0.250.0110.00416.81
8.0.240.0080.00516.68
8.0.230.0040.00416.77
8.0.220.0080.00416.64
8.0.210.0070.00716.67
8.0.200.0130.00316.63
8.0.190.0120.00216.82
8.0.180.0110.00416.72
8.0.170.0060.00916.67
8.0.160.0130.00016.73
8.0.150.0120.00416.67
8.0.140.0120.00416.70
8.0.130.0100.00516.67
8.0.120.0070.00316.57
8.0.110.0070.00416.68
8.0.100.0140.00316.71
8.0.90.0120.00616.68
8.0.80.0090.00316.77
8.0.70.0120.00016.64
8.0.60.0080.00516.55
8.0.50.0000.01416.70
8.0.30.0120.00016.68
8.0.20.0140.00016.68
8.0.10.0080.00416.78
7.4.330.0070.00118.10

preferences:
36.24 ms | 403 KiB | 5 Q