3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['this','is', 1, 'array', 'for', 1, 'example']; $str = array(); $int = array(); foreach($arr as $k => $val) { if(gettype($arr[$k]) == 'string'){ $str[] = $arr[$k]; } else { $int[] = $arr[$k]; } } print_r($str); print_r($int);

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.130.0160.00517.70
8.4.120.0060.00220.58
8.4.110.0140.00722.21
8.4.100.0110.01017.63
8.4.90.0050.00418.75
8.4.80.0060.00217.76
8.4.70.0070.01217.96
8.4.60.0090.00818.93
8.4.50.0090.00820.51
8.4.40.0090.00019.43
8.4.30.0170.00320.56
8.4.20.0100.01019.71
8.4.10.0070.00317.72
8.3.260.0130.00616.75
8.3.250.0120.00719.06
8.3.240.0120.00816.39
8.3.230.0110.00816.66
8.3.220.0080.01017.32
8.3.210.0120.00616.69
8.3.200.0060.00516.91
8.3.190.0060.00417.30
8.3.180.0110.01016.71
8.3.170.0090.00920.56
8.3.160.0030.00618.45
8.3.150.0100.01016.62
8.3.140.0040.00418.95
8.3.130.0030.00518.72
8.3.120.0040.00420.66
8.3.110.0040.00416.74
8.3.100.0000.01216.61
8.3.90.0080.00026.77
8.3.80.0060.00317.97
8.3.70.0040.01116.50
8.3.60.0060.01318.43
8.3.50.0100.00324.47
8.3.40.0130.00318.66
8.3.30.0120.00318.84
8.3.20.0040.00420.74
8.3.10.0040.00420.38
8.3.00.0040.00420.76
8.2.290.0080.00420.67
8.2.280.0110.00722.48
8.2.270.0070.01119.01
8.2.260.0070.00016.49
8.2.250.0040.00416.76
8.2.240.0080.00017.18
8.2.230.0040.00420.94
8.2.220.0050.00524.06
8.2.210.0140.00426.77
8.2.200.0090.00016.63
8.2.190.0130.00616.58
8.2.180.0120.00916.38
8.2.170.0070.01422.96
8.2.160.0070.00722.13
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00619.22
8.2.110.0090.00020.42
8.2.100.0110.00017.97
8.2.90.0030.00517.95
8.2.80.0080.00018.05
8.2.70.0040.00417.93
8.2.60.0000.00818.16
8.2.50.0000.00818.10
8.2.40.0060.00319.47
8.2.30.0080.00019.21
8.2.20.0050.00218.18
8.2.10.0020.00518.92
8.2.00.0000.00719.26
8.1.330.0070.00422.04
8.1.320.0080.01016.13
8.1.310.0040.00418.39
8.1.300.0110.00815.96
8.1.290.0060.00318.88
8.1.280.0150.00025.92
8.1.270.0000.00723.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00523.63
8.1.230.0090.00322.69
8.1.220.0050.00317.80
8.1.210.0030.00520.06
8.1.200.0060.00317.35
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0040.00418.43
8.1.160.0070.00018.88
8.1.150.0030.00518.89
8.1.140.0070.00018.88
8.1.130.0050.00320.14
8.1.120.0000.00717.43
8.1.110.0060.00317.43
8.1.100.0060.00317.38
8.1.90.0040.00417.48
8.1.80.0060.00317.42
8.1.70.0030.00317.41
8.1.60.0040.00417.47
8.1.50.0040.00717.56
8.1.40.0030.00617.48
8.1.30.0070.00017.61
8.1.20.0080.00017.66
8.1.10.0030.00617.50
8.1.00.0000.01017.33
8.0.300.0070.00020.05
8.0.290.0030.00516.75
8.0.280.0000.00718.39
8.0.270.0030.00617.18
8.0.260.0000.00620.07
8.0.250.0030.00316.92
8.0.240.0070.00016.97
8.0.230.0000.00716.87
8.0.220.0030.00316.92
8.0.210.0030.00316.96
8.0.200.0030.00316.79
8.0.190.0090.00016.96
8.0.180.0040.00416.89
8.0.170.0040.00416.83
8.0.160.0030.00616.91
8.0.150.0000.00716.71
8.0.140.0000.00816.73
8.0.130.0050.00013.35
8.0.120.0030.00516.79
8.0.110.0040.00416.70
8.0.100.0040.00416.87
8.0.90.0080.00016.96
8.0.80.0070.01016.88
8.0.70.0040.00416.88
8.0.60.0000.00716.88
8.0.50.0000.00716.74
8.0.30.0120.00917.02
8.0.20.0090.00917.10
8.0.10.0040.00416.90
8.0.00.0150.00616.64
7.4.330.0050.00015.55
7.4.320.0070.00016.51
7.4.300.0060.00016.58
7.4.290.0000.00816.57
7.4.280.0040.00416.50
7.4.270.0000.00716.43
7.4.260.0050.00013.35
7.4.250.0030.00316.43
7.4.240.0020.00616.49
7.4.230.0030.00316.30
7.4.220.0000.00716.62
7.4.210.0120.00916.63
7.4.200.0030.00316.39
7.4.130.0070.01116.56
7.4.120.0160.01016.55
7.4.110.0070.01016.54
7.4.100.0140.00316.52
7.4.90.0070.01016.41
7.4.80.0110.00819.39
7.4.70.0130.00316.38
7.4.60.0160.00016.52
7.4.50.0100.00716.35
7.4.40.0030.01316.53
7.4.00.0020.01214.79
7.3.330.0000.00716.14
7.3.320.0000.00513.10
7.3.310.0040.00416.20
7.3.300.0030.00516.20
7.3.290.0090.00916.30
7.3.260.0060.01216.60
7.3.230.0100.00616.27
7.3.210.0100.00716.30
7.3.200.0070.01416.50
7.3.190.0140.00316.30
7.3.180.0040.01116.39
7.3.170.0080.00816.55
7.3.160.0070.01016.52
7.3.120.0070.00614.64
7.3.110.0050.00914.72
7.3.100.0080.00714.70
7.3.90.0120.00414.71
7.3.80.0070.01014.77
7.3.70.0080.00914.72
7.3.60.0080.01014.79
7.3.50.0050.00814.60
7.3.40.0080.00914.53
7.3.30.0080.00614.74
7.3.20.0090.00914.77
7.3.10.0050.01114.71
7.3.00.0120.00514.75
7.2.330.0070.01716.80
7.2.320.0030.01416.74
7.2.310.0030.01616.52
7.2.300.0130.01016.75
7.2.290.0110.00616.70
7.2.250.0090.00815.10
7.2.240.0090.00514.99
7.2.230.0060.00914.80
7.2.220.0080.00814.95
7.2.210.0100.00914.97
7.2.200.0090.00814.82
7.2.190.0080.01015.00
7.2.180.0120.00714.98
7.2.170.0090.00615.02
7.2.160.0080.00915.00
7.2.150.0020.01815.04
7.2.140.0120.00914.75
7.2.130.0150.00514.82
7.2.120.0040.01214.95
7.2.110.0190.00915.05
7.2.100.0090.00914.91
7.2.90.0160.00715.02
7.2.80.0140.00614.92
7.2.70.0110.00914.87
7.2.60.0120.01015.17
7.2.50.0130.00815.00
7.2.40.0110.01015.24
7.2.30.0100.01015.07
7.2.20.0180.00314.86
7.2.10.0130.00714.95
7.2.00.0070.00914.66
7.1.330.0070.00613.82
7.1.320.0120.00413.81
7.1.310.0110.00714.07
7.1.300.0070.00513.95
7.1.290.0120.00713.92
7.1.280.0100.00413.94
7.1.270.0110.00413.88
7.1.260.0080.00713.82
7.1.250.0130.00713.94

preferences:
123.8 ms | 403 KiB | 5 Q