3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface DoThing { public function doThing(): void; } class SimplyDoThing implements DoThing { public function doThing(): void { echo 'Thing done.' . PHP_EOL; } } class DoThingAndLog implements DoThing { public function __construct(private object $logger) {} public function doThing(): void { echo 'Thing done.' . PHP_EOL; echo 'Log logged.' . PHP_EOL; } } class DoThingAndMail implements DoThing { public function __construct(private object $mailer) {} public function doThing(): void { echo 'Thing done.' . PHP_EOL; echo 'Mail sended.' . PHP_EOL; } } (new SimplyDoThing)->doThing(); (new DoThingAndLog(new stdClass))->doThing(); (new DoThingAndMail(new stdClass))->doThing();

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.0120.00823.87
8.4.110.0050.00319.13
8.4.100.0110.01017.74
8.4.90.0120.00818.00
8.4.80.0120.00918.00
8.4.70.0140.00717.82
8.4.60.0120.01018.57
8.4.50.0100.01022.24
8.4.40.0150.00419.36
8.4.30.0130.00720.64
8.4.20.0030.00619.79
8.4.10.0000.00819.41
8.3.250.0070.00118.83
8.3.240.0100.00917.23
8.3.230.0120.00616.56
8.3.220.0120.00617.18
8.3.210.0120.00716.79
8.3.200.0110.00816.61
8.3.190.0100.01117.41
8.3.180.0080.01018.21
8.3.170.0070.01118.89
8.3.160.0060.01216.58
8.3.150.0150.00417.35
8.3.140.0000.01817.12
8.3.130.0120.00318.31
8.3.120.0060.00320.88
8.3.110.0130.00618.14
8.3.100.0070.01016.44
8.3.90.0100.00626.77
8.3.80.0110.00830.84
8.3.70.0370.01130.84
8.3.60.0330.01530.84
8.3.50.0150.00430.84
8.3.40.0290.00330.84
8.3.30.0180.01530.84
8.3.20.0330.01230.84
8.3.10.0500.00330.84
8.3.00.0380.00830.84
8.2.290.0110.00818.84
8.2.280.0140.00718.24
8.2.270.0070.01116.86
8.2.260.0030.00518.41
8.2.250.0000.00717.06
8.2.240.0030.00618.85
8.2.230.0060.00320.94
8.2.220.0040.00424.06
8.2.210.0060.00326.77
8.2.200.0370.00330.84
8.2.190.0110.00830.84
8.2.180.0160.00330.84
8.2.170.0130.00730.84
8.2.160.0170.00330.84
8.2.150.0120.00730.84
8.2.140.0390.00430.84
8.2.130.0280.00730.84
8.2.120.0390.00430.84
8.2.110.0390.00430.84
8.2.100.0360.00630.84
8.2.90.0290.01330.84
8.2.80.0370.00730.84
8.2.70.0330.00830.84
8.2.60.0390.00430.84
8.2.50.0230.01430.84
8.2.40.0310.00330.84
8.2.30.0200.01230.84
8.2.20.0160.00830.84
8.2.10.0350.00330.84
8.2.00.0310.00930.84
8.1.330.0040.00722.07
8.1.320.0150.00716.05
8.1.310.0070.01118.54
8.1.300.0170.00316.17
8.1.290.0330.00830.84
8.1.280.0300.01130.84
8.1.270.0470.00430.84
8.1.260.0420.00430.84
8.1.250.0360.01030.84
8.1.240.0410.00330.84
8.1.230.0310.00930.84
8.1.220.0310.00730.84
8.1.210.0290.01130.84
8.1.200.0380.00630.84
8.1.190.0210.00930.84
8.1.180.0170.00630.84
8.1.170.0310.00630.84
8.1.160.0290.00730.84
8.1.150.0310.00730.84
8.1.140.0310.00730.84
8.1.130.0310.00730.84
8.1.120.0260.01130.84
8.1.110.0350.00330.84
8.1.100.0270.01030.84
8.1.90.0240.01430.84
8.1.80.0150.01530.84
8.1.70.0270.00630.84
8.1.60.0300.00330.84
8.1.50.0280.00930.84
8.1.40.0450.00030.84
8.1.30.0280.00930.84
8.1.20.0320.00630.84
8.1.10.0310.01230.84
8.1.00.0380.00930.84

preferences:
27.97 ms | 403 KiB | 5 Q