3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = []; $init_arr = [ ['name'=>'grape','num'=>2], ['name'=>'melon','num'=>1] ]; $result['init_arr'] = $init_arr; $removed_arr = my_remove_data( $init_arr, 2 ); $result['removed_arr'] = $removed_arr; array_unshift( $init_arr, ['name'=>'apple','num'=>3] ); $result['added_arr'] = $init_arr; var_dump( $result ); function my_remove_data( $arr, $id ){ foreach($arr as $k1=>$a) { foreach($a as $k2=>$b) { if($b == $id) { unset($arr[$k1]); } } } return $arr; }

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.10.0080.00017.74
8.3.140.0040.00417.34
8.3.130.0080.00018.25
8.3.120.0040.00418.89
8.3.110.0070.01120.94
8.3.100.0100.01024.06
8.3.90.0000.00826.77
8.3.80.0060.00316.75
8.3.70.0110.01118.30
8.3.60.0040.01418.31
8.3.50.0050.00724.42
8.3.40.0070.01018.84
8.3.30.0130.00318.66
8.3.20.0120.00020.90
8.3.10.0050.00322.04
8.3.00.0050.00320.61
8.2.260.0090.00618.88
8.2.250.0040.00418.37
8.2.240.0090.00019.01
8.2.230.0120.00622.58
8.2.220.0090.00037.54
8.2.210.0000.00826.77
8.2.200.0030.00616.50
8.2.190.0120.00916.75
8.2.180.0160.00316.50
8.2.170.0090.00619.13
8.2.160.0110.00422.96
8.2.150.0180.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00320.50
8.2.110.0070.00421.11
8.2.100.0090.00319.57
8.2.90.0030.00719.22
8.2.80.0070.00317.97
8.2.70.0090.00017.63
8.2.60.0030.00518.03
8.2.50.0040.00418.07
8.2.40.0080.00018.12
8.2.30.0030.00518.10
8.2.20.0040.00418.10
8.2.10.0050.00318.80
8.2.00.0000.00719.33
8.1.310.0040.00418.29
8.1.300.0150.00418.00
8.1.290.0090.00018.88
8.1.280.0070.00725.92
8.1.270.0060.00320.61
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0030.00721.25
8.1.230.0080.00419.00
8.1.220.0000.00917.79
8.1.210.0030.00518.77
8.1.200.0000.01217.25
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0050.00318.37
8.1.160.0050.00218.85
8.1.150.0040.00418.88
8.1.140.0000.00718.93
8.1.130.0040.00420.07
8.1.120.0040.00417.47
8.1.110.0080.00017.34
8.1.100.0040.00417.35
8.1.90.0000.00717.42
8.1.80.0000.00817.35
8.1.70.0060.00317.36
8.1.60.0060.00317.47
8.1.50.0030.00517.54
8.1.40.0000.00917.52
8.1.30.0030.00617.69
8.1.20.0050.00317.71
8.1.10.0000.00817.60
8.1.00.0040.00417.40
8.0.300.0040.00418.77
8.0.290.0040.00716.63
8.0.280.0000.00818.44
8.0.270.0040.00417.30
8.0.260.0000.00619.95
8.0.250.0070.00016.96
8.0.240.0000.00816.91
8.0.230.0030.00316.84
8.0.220.0070.00016.86
8.0.210.0030.00316.91
8.0.200.0000.00616.99
8.0.190.0000.00716.84
8.0.180.0060.00316.89
8.0.170.0050.00316.80
8.0.160.0050.00516.93
8.0.150.0030.00416.71
8.0.140.0000.00716.75
8.0.130.0000.00513.28
8.0.120.0030.00516.88
8.0.110.0080.00016.84
8.0.100.0000.00816.89
8.0.90.0040.00416.72
8.0.80.0040.01116.85
8.0.70.0000.00716.93
8.0.60.0030.00516.88
8.0.50.0040.00416.71
8.0.30.0120.01516.87
8.0.20.0200.00916.86
8.0.10.0070.00017.01
8.0.00.0090.01916.73
7.4.330.0000.00515.55
7.4.320.0080.00016.64
7.4.300.0000.00616.41
7.4.290.0000.00716.59
7.4.280.0030.00616.51
7.4.270.0030.00316.55
7.4.260.0000.00613.26
7.4.250.0070.00016.54
7.4.240.0000.00716.60
7.4.230.0070.00016.25
7.4.220.0030.00316.65
7.4.210.0060.00916.47
7.4.200.0000.00716.67
7.4.130.0140.00616.43
7.4.120.0120.00616.56
7.4.110.0120.00616.40
7.4.100.0120.00916.50
7.4.90.0100.01216.32
7.4.80.0120.00919.39
7.4.70.0060.01116.36
7.4.60.0130.00316.39
7.4.50.0070.00716.19
7.4.40.0120.00616.34
7.4.00.0070.01015.16
7.3.330.0030.00516.47
7.3.320.0000.00513.34
7.3.310.0030.00316.22
7.3.300.0030.00316.30
7.3.290.0110.00616.38
7.3.280.0150.00516.43
7.3.260.0130.00516.35
7.3.240.0130.00616.42
7.3.230.0180.00316.39
7.3.210.0170.00816.39
7.3.200.0070.01116.51
7.3.190.0100.00716.45
7.3.180.0100.01416.27
7.3.170.0030.01416.37
7.3.160.0090.00916.68
7.3.120.0040.01114.97
7.3.110.0030.01214.64
7.3.100.0120.00814.70
7.3.90.0090.01114.84
7.3.80.0080.00815.04
7.3.70.0130.00714.79
7.3.60.0070.00714.79
7.3.50.0110.00714.82
7.3.40.0090.01114.96
7.3.30.0150.00014.89
7.3.20.0120.00414.84
7.3.10.0090.00614.86
7.3.00.0180.00314.93
7.2.330.0090.00916.70
7.2.320.0100.00616.68
7.2.310.0060.01216.73
7.2.300.0120.00616.67
7.2.290.0060.01516.85
7.2.240.0060.01014.77
7.2.230.0030.01614.89
7.2.220.0130.00314.84
7.2.210.0090.00614.97
7.2.200.0080.01115.10
7.2.190.0150.00615.13
7.2.180.0050.01315.12
7.2.170.0080.00815.10
7.2.160.0060.00915.00
7.2.150.0080.00815.13
7.2.140.0070.01015.25
7.2.130.0130.01015.26
7.2.120.0030.01214.89
7.2.110.0150.00714.91
7.2.100.0060.01715.08
7.2.90.0080.00815.23
7.2.80.0090.00615.05
7.2.70.0120.00914.95
7.2.60.0030.01315.15
7.2.50.0120.00315.01
7.2.40.0090.01214.85
7.2.30.0170.01014.91
7.2.20.0130.00315.16
7.2.10.0120.00415.16
7.2.00.0100.00715.15
7.1.330.0150.00014.14
7.1.320.0060.00914.19
7.1.310.0110.00713.81
7.1.300.0090.00913.69
7.1.290.0120.00814.00
7.1.280.0090.00514.04
7.1.270.0110.00514.15
7.1.260.0140.00013.89
7.1.250.0050.01013.98

preferences:
28.74 ms | 403 KiB | 5 Q