3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array('assets/image/man.jpg', 'assets/image/violin.jpg', 'assets/image/test.txt'); $images = array(); $images_exts = array('jpg','png'); foreach($input as $value) { echo @end(explode('.', $value)); if(in_array(@end(explode('.', $value)), $images_exts)) { $images[] = $value; } } var_dump($images);

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.140.0110.01117.50
8.4.130.0110.00817.73
8.4.120.0140.00620.69
8.4.110.0100.00718.97
8.4.100.0100.01017.76
8.4.90.0100.01118.07
8.4.80.0130.00818.14
8.4.70.0130.00517.71
8.4.60.0130.00819.63
8.4.50.0100.01119.48
8.4.40.0070.01319.63
8.4.30.0040.00420.42
8.4.20.0030.01720.60
8.4.10.0000.00918.03
8.3.270.0090.01016.85
8.3.260.0070.00416.79
8.3.250.0070.00518.90
8.3.240.0130.00616.91
8.3.230.0100.00916.75
8.3.220.0080.00617.49
8.3.210.0080.01116.90
8.3.200.0080.01118.66
8.3.190.0130.00616.66
8.3.180.0050.00318.55
8.3.170.0070.01117.29
8.3.160.0150.00318.73
8.3.150.0110.00717.20
8.3.140.0090.00617.22
8.3.130.0080.00018.53
8.3.120.0110.00418.73
8.3.110.0130.00320.94
8.3.100.0030.00724.06
8.3.90.0040.00726.77
8.3.80.0060.00316.88
8.3.70.0110.00716.75
8.3.60.0090.00618.43
8.3.50.0150.00518.37
8.3.40.0120.00318.64
8.3.30.0040.01118.63
8.3.20.0040.00420.91
8.3.10.0040.00423.66
8.3.00.0000.00823.52
8.2.290.0090.01020.48
8.2.280.0120.00616.68
8.2.270.0110.00716.70
8.2.260.0080.00018.88
8.2.250.0050.00316.62
8.2.240.0120.00316.82
8.2.230.0030.00722.58
8.2.220.0080.00037.54
8.2.210.0050.00326.77
8.2.200.0030.00618.29
8.2.190.0160.00716.88
8.2.180.0120.00625.92
8.2.170.0090.00619.02
8.2.160.0150.00022.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0000.00818.09
8.2.120.0040.00426.35
8.2.110.0030.00621.05
8.2.100.0060.00617.84
8.2.90.0050.00317.72
8.2.80.0040.00418.91
8.2.70.0000.00817.50
8.2.60.0050.00318.04
8.2.50.0050.00518.07
8.2.40.0050.00318.02
8.2.30.0070.00018.05
8.2.20.0040.00518.07
8.2.10.0040.00419.26
8.2.00.0040.00419.27
8.1.330.0120.00716.78
8.1.320.0120.00715.96
8.1.310.0040.01116.67
8.1.300.0030.00618.27
8.1.290.0060.00330.84
8.1.280.0130.00625.92
8.1.270.0030.00618.89
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00022.09
8.1.230.0040.00817.62
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0050.00318.58
8.1.160.0050.00218.81
8.1.150.0040.00418.94
8.1.140.0000.00722.06
8.1.130.0030.00620.21
8.1.120.0000.01117.33
8.1.110.0040.00517.45
8.1.100.0040.00417.37
8.1.90.0030.00617.48
8.1.80.0070.00017.47
8.1.70.0060.00317.47
8.1.60.0000.00917.56
8.1.50.0040.00717.57
8.1.40.0040.00417.57
8.1.30.0040.00417.56
8.1.20.0030.00517.47
8.1.10.0000.00917.39
8.1.00.0030.00717.51
8.0.300.0080.00018.77
8.0.290.0060.00316.75
8.0.280.0070.00020.30
8.0.270.0000.00817.27
8.0.260.0030.00318.36
8.0.250.0000.00716.97
8.0.240.0030.00516.93
8.0.230.0060.00016.95
8.0.220.0000.00717.01
8.0.210.0070.00016.98
8.0.200.0030.00617.01
8.0.190.0040.00416.89
8.0.180.0040.00417.00
8.0.170.0030.00616.95
8.0.160.0000.00717.04
8.0.150.0000.01016.95
8.0.140.0040.00416.91
8.0.130.0050.00013.39
8.0.120.0000.00717.01
8.0.110.0050.00316.93
8.0.100.0040.00417.03
8.0.90.0050.00217.02
8.0.80.0100.00716.98
8.0.70.0000.00716.86
8.0.60.0080.00017.00
8.0.50.0040.00416.97
8.0.30.0090.00917.06
8.0.20.0110.00717.40
8.0.10.0000.00716.94
8.0.00.0120.00616.87
7.4.330.0000.00515.55
7.4.320.0060.00016.61
7.4.300.0030.00316.41
7.4.290.0040.00416.52
7.4.280.0030.00616.58
7.4.270.0000.00716.56
7.4.260.0030.00316.50
7.4.250.0030.00316.45
7.4.240.0070.00016.62
7.4.230.0030.00316.33
7.4.220.0000.00916.36
7.4.210.0080.01016.52
7.4.200.0030.00316.50
7.4.160.0080.00816.48
7.4.140.0090.01017.86
7.4.130.0140.00516.67
7.4.120.0160.00616.60
7.4.110.0090.00916.46
7.4.100.0170.00416.58
7.4.90.0120.00416.69
7.4.80.0110.01119.39
7.4.70.0030.01516.35
7.4.60.0030.01316.55
7.4.50.0030.01216.63
7.4.40.0070.01016.51
7.4.00.0080.00315.02
7.3.330.0060.00013.08
7.3.320.0000.00513.18
7.3.310.0030.00316.16
7.3.300.0040.00416.32
7.3.290.0000.00716.35
7.3.280.0060.01116.29
7.3.260.0130.00716.45
7.3.240.0080.01016.56
7.3.230.0090.00916.71
7.3.210.0110.00616.35
7.3.200.0060.00916.54
7.3.190.0080.00916.24
7.3.180.0140.00716.54
7.3.170.0140.00316.32
7.3.160.0100.00616.50
7.3.00.0540.00314.62
7.2.330.0070.01016.52
7.2.320.0090.00616.50
7.2.310.0160.00516.44
7.2.300.0100.00716.40
7.2.290.0100.00716.59
7.2.130.0610.00615.01
7.2.120.1050.00715.04
7.2.110.0490.00314.95
7.2.100.0380.01014.99
7.2.90.0890.00315.10
7.2.80.0430.00315.10
7.2.70.0450.00315.20
7.2.60.0400.00614.95
7.2.50.0420.00715.02
7.2.40.0410.00615.11
7.2.30.0460.00614.92
7.2.20.0450.00315.05
7.2.10.0470.00314.96
7.2.00.1130.00715.02
7.1.250.1240.00013.69

preferences:
30.45 ms | 403 KiB | 5 Q