3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SmartObject { public function __call(string $name, array $args) { return 'smart ' . $name; } } class Component { use SmartObject; } class FormControl extends Component { public function __call(string $name, array $args): mixed { return 'control ' . $name; } } class CustomFormControl extends FormControl { //use SmartObject; } var_dump((new FormControl)->foo()); var_dump((new CustomFormControl)->foo());

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.120.0100.01022.25
8.4.110.0080.01222.57
8.4.100.0120.00617.72
8.4.90.0160.00518.44
8.4.80.0040.00519.64
8.4.70.0090.01117.58
8.4.60.0100.01018.82
8.4.50.0080.00920.26
8.4.40.0100.01018.49
8.4.30.0100.01318.82
8.4.20.0120.00320.54
8.4.10.0110.00719.31
8.3.250.0090.00918.68
8.3.240.0110.00817.07
8.3.230.0040.00416.56
8.3.220.0120.00619.02
8.3.210.0140.00416.73
8.3.200.0080.00916.42
8.3.190.0070.00117.21
8.3.180.0100.00916.57
8.3.170.0140.00420.35
8.3.160.0090.00917.36
8.3.150.0060.00917.17
8.3.140.0040.00416.97
8.3.130.0140.00718.30
8.3.120.0070.01120.58
8.3.110.0050.00518.32
8.3.100.0030.00616.41
8.3.90.0080.00026.77
8.3.80.0090.00017.97
8.3.70.0200.00617.23
8.3.60.0310.00821.95
8.3.50.0060.01122.05
8.3.40.0290.00221.95
8.3.30.0280.00821.95
8.3.20.0280.00821.95
8.3.10.0260.00821.95
8.3.00.0410.00221.95
8.2.290.0040.00620.24
8.2.280.0020.00618.36
8.2.270.0060.01318.66
8.2.260.0120.00618.26
8.2.250.0000.00817.20
8.2.240.0030.00518.72
8.2.230.0110.00720.94
8.2.220.0030.00616.43
8.2.210.0090.00926.77
8.2.200.0060.00616.63
8.2.190.0150.01218.00
8.2.180.0300.00421.95
8.2.170.0270.00921.95
8.2.160.0290.00721.95
8.2.150.0260.00821.95
8.2.140.0210.01221.95
8.2.130.0300.00421.95
8.2.120.0270.00621.95
8.2.110.0290.00621.95
8.2.100.0240.00821.95
8.2.90.0220.00821.95
8.2.80.0210.00821.95
8.2.70.0200.01121.95
8.2.60.0270.00521.95
8.2.50.0280.00421.95
8.2.40.0250.00521.95
8.2.30.0230.00621.95
8.2.20.0180.00921.95
8.2.10.0170.01021.95
8.2.00.0250.00621.95
8.1.330.0090.00921.56
8.1.320.0090.01015.93
8.1.310.0080.00016.54
8.1.300.0040.00418.00
8.1.290.0090.00030.84
8.1.280.0280.00521.95
8.1.270.0330.00521.95
8.1.260.0330.00621.95
8.1.250.0300.00721.95
8.1.240.0220.01021.95
8.1.230.0260.00521.95
8.1.220.0230.00721.95
8.1.210.0210.01021.95
8.1.200.0300.00221.95
8.1.190.0160.01521.95
8.1.180.0250.00621.95
8.1.170.0280.00521.95
8.1.160.0250.00421.95
8.1.150.0300.00321.95
8.1.140.0230.00421.95
8.1.130.0190.00821.95
8.1.120.0260.00621.95
8.1.110.0250.00321.95
8.1.100.0230.00421.95
8.1.90.0230.00821.95
8.1.80.0210.00821.95
8.1.70.0190.01021.95
8.1.60.0230.00821.95
8.1.50.0230.01221.95
8.1.40.0330.00321.95
8.1.30.0230.00821.95
8.1.20.0260.00721.95
8.1.10.0240.00721.95
8.1.00.0270.00321.95

preferences:
27.15 ms | 403 KiB | 5 Q