3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $song_ratings = [ 'Bullet with Butterfly Wings' => 5, '1979' => 4, 'Tonight, Tonight' => 4, ]; function display_rating(int $rating, string $title) { return "$title: $rating"; } foreach ($song_ratings as $title => $rating) { echo display_rating($rating, $title) . PHP_EOL; }

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.5.30.0080.01117.91
8.5.20.0110.00820.12
8.5.10.0130.00516.86
8.5.00.0120.00920.32
8.4.180.0110.01019.76
8.4.170.0150.00623.87
8.4.160.0130.00822.12
8.4.150.0060.00616.95
8.4.140.0150.00617.57
8.4.130.0040.00617.88
8.4.120.0060.00320.80
8.4.110.0110.01018.96
8.4.100.0080.00217.95
8.4.90.0120.00918.16
8.4.80.0300.00818.53
8.4.70.0390.00917.85
8.4.60.0400.00717.97
8.4.50.0290.00717.76
8.4.40.0330.01017.69
8.4.30.0360.00817.48
8.4.20.0370.00817.46
8.4.10.0310.00917.68
8.3.300.0100.00920.70
8.3.290.0120.00820.86
8.3.280.0130.00718.44
8.3.270.0090.01116.55
8.3.260.0100.00816.55
8.3.250.0100.00918.85
8.3.240.0150.00416.79
8.3.230.0120.00816.75
8.3.220.0220.00616.97
8.3.210.0260.00716.97
8.3.200.0320.00716.97
8.3.190.0350.00716.97
8.3.180.0360.00516.97
8.3.170.0380.01016.97
8.3.160.0450.00816.97
8.3.150.0410.01016.97
8.3.140.0320.00816.97
8.3.130.0290.00516.97
8.3.120.0220.00616.97
8.3.110.0240.00516.97
8.3.100.0280.00716.97
8.3.90.0360.00716.97
8.3.80.0360.00616.97
8.3.70.0410.00816.97
8.3.60.0390.00616.97
8.3.50.0360.00716.97
8.3.40.0410.00717.51
8.3.30.0350.00517.42
8.3.20.0300.00717.43
8.3.10.0200.00417.63
8.3.00.0210.00517.51
8.2.300.0100.01020.25
8.2.290.0110.00818.93
8.2.280.0300.00916.97
8.2.270.0270.00716.97
8.2.260.0310.00616.97
8.2.250.0270.00816.97
8.2.240.0280.00716.97
8.2.230.0300.00616.97
8.2.220.0250.00616.97
8.2.210.0270.00716.97
8.2.200.0320.00916.97
8.2.190.0330.00816.97
8.2.180.0300.00416.97
8.2.170.0310.00817.74
8.2.160.0270.00517.75
8.2.150.0370.00817.47
8.2.140.0310.00617.57
8.2.130.0290.00817.48
8.2.120.0280.00717.61
8.2.110.0310.00617.53
8.2.100.0270.00717.45
8.2.90.0290.00717.63
8.2.80.0310.00717.54
8.2.70.0380.00717.34
8.2.60.0330.00817.55
8.2.50.0370.00817.45
8.2.40.0370.00817.33
8.2.30.0360.00817.50
8.2.20.0290.00517.45
8.2.10.0330.00717.40
8.2.00.0340.00717.50
8.1.340.0120.00820.43

preferences:
52.24 ms | 867 KiB | 5 Q