3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['DTSTART' => '2017-01-02', 'SUMMARY;LANGUAGE=en' => 'Non-recyclable waste'], ['DTSTART' => '2017-01-03', 'SUMMARY;LANGUAGE=en' => 'Bio-waste'], ['DTSTART' => '2017-01-04', 'SUMMARY;LANGUAGE=en' => 'Junk'], ]; $finalDate = '2038-12-31'; $result = []; foreach ($arr as $value) { if ($value['DTSTART'] > $finalDate) { continue; } $result[] = [ 'day' => $value['DTSTART'], 'type' => $value['SUMMARY;LANGUAGE=en'], ...match($value['SUMMARY;LANGUAGE=en']) { 'Non-recyclable waste', 'Bio-waste' => ['color' => 'success'], default => [] } ]; } var_export($result);

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.10.0130.01016.74
8.5.00.0150.00621.66
8.4.160.0160.00523.82
8.4.150.0020.00014.05
8.4.140.0080.01317.55
8.4.130.0070.00417.57
8.4.120.0130.00620.68
8.4.110.0140.00622.68
8.4.100.0090.01017.80
8.4.90.0140.00617.52
8.4.80.0030.00817.95
8.4.70.0100.01017.66
8.4.60.0130.00818.75
8.4.50.0110.00820.43
8.4.40.0030.00717.78
8.4.30.0070.00318.61
8.4.20.0090.00919.48
8.4.10.0060.00319.49
8.3.280.0150.00718.45
8.3.270.0080.01216.79
8.3.260.0060.00516.64
8.3.250.0110.00718.76
8.3.240.0120.00816.62
8.3.230.0130.00516.78
8.3.220.0030.00517.34
8.3.210.0100.01016.60
8.3.200.0120.00716.49
8.3.190.0100.00916.76
8.3.180.0120.00616.45
8.3.170.0130.00619.09
8.3.160.0040.01418.97
8.3.150.0130.00618.97
8.3.140.0050.00319.12
8.3.130.0080.00018.42
8.3.120.0120.00619.02
8.3.110.0030.00620.94
8.3.100.0000.00818.51
8.3.90.0150.00326.77
8.3.80.0500.00030.84
8.3.70.0500.00030.84
8.3.60.0490.01330.84
8.3.50.0260.01030.84
8.3.40.0380.00830.84
8.3.30.0340.00830.84
8.3.20.0260.01630.84
8.3.10.0200.01030.84
8.3.00.0400.00430.84
8.2.290.0060.00220.38
8.2.280.0120.00616.97
8.2.270.0110.00716.96
8.2.260.0100.00618.67
8.2.250.0040.00418.48
8.2.240.0090.00018.79
8.2.230.0050.00322.58
8.2.220.0000.00824.06
8.2.210.0070.01026.77
8.2.200.0390.01030.84
8.2.190.0370.00730.84
8.2.180.0180.00630.84
8.2.170.0360.00730.84
8.2.160.0220.00630.84
8.2.150.0160.00430.84
8.2.140.0120.00830.84
8.2.130.0350.00630.84
8.2.120.0360.00930.84
8.2.110.0280.01430.84
8.2.100.0380.00330.84
8.2.90.0380.00730.84
8.2.80.0360.00630.84
8.2.70.0330.00930.84
8.2.60.0330.00730.84
8.2.50.0350.00630.84
8.2.40.0400.00030.84
8.2.30.0320.00730.84
8.2.20.0390.00930.84
8.2.10.0340.00830.84
8.2.00.0400.00030.84
8.1.330.0100.00916.70
8.1.320.0120.00716.10
8.1.310.0000.01016.77
8.1.300.0130.00620.40
8.1.290.0250.01830.84
8.1.280.0230.00330.84
8.1.270.0290.01330.84
8.1.260.0220.01330.84
8.1.250.0410.00730.84
8.1.240.0350.00330.84
8.1.230.0280.00630.84
8.1.220.0220.01530.84
8.1.210.0410.00030.84
8.1.200.0320.00630.84
8.1.190.0360.00830.84
8.1.180.0380.01330.84
8.1.170.0290.01030.84
8.1.160.0290.00930.84
8.1.150.0230.01430.84
8.1.140.0290.00830.84
8.1.130.0320.00630.84
8.1.120.0280.01030.84
8.1.110.0270.01030.84
8.1.100.0300.01030.84
8.1.90.0300.01130.84
8.1.80.0320.00830.84
8.1.70.0360.00630.84
8.1.60.0370.00730.84
8.1.50.0340.00730.84
8.1.40.0260.01130.84
8.1.30.0360.00830.84
8.1.20.0420.00730.84
8.1.10.0310.01230.84
8.1.00.0330.01230.84

preferences:
29.8 ms | 403 KiB | 5 Q