3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents = array ( 0 => Array ( 'id' => 1, 'title' => 'Text1', 'slug' => 'text1', ), 1 => Array ( 'id' => 2, 'title' => 'Text2', 'slug' => 'text2' ), 2 => Array ( 'id' => 3, 'title' => 'Text3', 'slug' => 'text3' ), 3 => Array ( 'id' => 4, 'title' => 'Text3', 'slug' => 'text3' ) ); $path = 'text3'; //$this->uri->segment(1); foreach($contents as $key=>$val){ if(in_array($path, $val)){ unset($contents[$key]); } } echo "<pre>"; print_r($contents);

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.0090.00819.61
8.5.00.0110.01019.90
8.4.150.0020.00014.05
8.4.140.0110.00917.58
8.4.130.0070.00319.00
8.4.120.0140.00720.61
8.4.110.0120.00917.80
8.4.100.0120.00617.76
8.4.90.0140.00620.63
8.4.80.0110.00118.06
8.4.70.0130.00717.74
8.4.60.0160.00418.84
8.4.50.0140.00717.80
8.4.40.0080.00819.43
8.4.30.0060.01319.62
8.4.20.0190.00319.65
8.4.10.0060.00317.88
8.3.280.0100.01118.51
8.3.270.0110.01116.44
8.3.260.0080.00716.50
8.3.250.0120.00718.59
8.3.240.0130.00616.56
8.3.230.0100.00916.72
8.3.220.0020.00619.06
8.3.210.0090.01116.61
8.3.200.0090.01016.73
8.3.190.0040.00417.22
8.3.180.0130.00616.77
8.3.170.0140.00417.12
8.3.160.0100.00016.70
8.3.150.0140.00417.29
8.3.140.0090.00619.09
8.3.130.0060.00318.61
8.3.120.0030.00618.99
8.3.110.0000.00920.94
8.3.100.0110.00424.06
8.3.90.0030.01026.77
8.3.80.0030.00617.97
8.3.70.0090.00618.30
8.3.60.0110.00718.55
8.3.50.0070.01221.03
8.3.40.0070.01418.84
8.3.30.0000.01418.70
8.3.20.0040.00420.13
8.3.10.0040.00421.73
8.3.00.0040.00422.14
8.2.290.0140.00416.82
8.2.280.0130.00618.39
8.2.270.0090.00617.05
8.2.260.0060.01218.79
8.2.250.0060.00318.30
8.2.240.0110.00718.86
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0080.00426.77
8.2.200.0090.00016.75
8.2.190.0090.00616.75
8.2.180.0070.01016.38
8.2.170.0120.00318.95
8.2.160.0140.00022.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00420.35
8.2.120.0040.00426.35
8.2.110.0090.00019.21
8.2.100.0060.00619.54
8.2.90.0040.00419.04
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0070.00018.35
8.2.30.0040.00418.21
8.2.20.0000.00718.09
8.2.10.0040.00418.13
8.2.00.0030.00618.35
8.1.330.0110.00716.34
8.1.320.0110.00816.34
8.1.310.0030.00716.48
8.1.300.0000.00918.19
8.1.290.0030.00730.84
8.1.280.0060.01325.92
8.1.270.0080.00023.91
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0160.00718.94
8.1.230.0090.00322.67
8.1.220.0000.00817.80
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0030.00518.91
8.1.160.0000.00818.89
8.1.150.0000.00720.05
8.1.140.0000.00719.57
8.1.130.0030.00318.91
8.1.120.0030.00317.51
8.1.110.0040.00417.39
8.1.100.0040.00417.45
8.1.90.0050.00217.48
8.1.80.0000.00717.41
8.1.70.0000.00717.46
8.1.60.0000.00717.65
8.1.50.0000.00817.45
8.1.40.0080.00017.52
8.1.30.0000.00817.63
8.1.20.0040.00417.53
8.1.10.0080.00017.54
8.1.00.0020.00517.50
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.45
8.0.270.0040.00416.81
8.0.260.0040.00419.00
8.0.250.0020.00516.95
8.0.240.0040.00416.96
8.0.230.0030.00317.00
8.0.220.0000.00616.93
8.0.210.0000.00716.82
8.0.200.0080.00317.02
8.0.190.0080.00016.96
8.0.180.0000.00816.81
8.0.170.0040.00416.86
8.0.160.0000.00716.88
8.0.150.0070.00416.82
8.0.140.0040.00416.76
8.0.130.0060.00313.39
8.0.120.0040.00416.79
8.0.110.0040.00417.00
8.0.100.0040.00416.83
8.0.90.0040.00416.93
8.0.80.0120.00316.86
8.0.70.0000.00816.70
8.0.60.0080.00016.89
8.0.50.0040.00416.68
8.0.30.0040.01316.90
8.0.20.0120.00617.40
8.0.10.0040.00417.04
8.0.00.0090.01016.79
7.4.330.0050.00015.55
7.4.320.0030.00316.53
7.4.300.0070.00016.64
7.4.290.0040.00416.46
7.4.280.0060.00316.59
7.4.270.0020.00516.49
7.4.260.0000.00716.49
7.4.250.0030.00316.48
7.4.240.0040.00416.48
7.4.230.0030.00316.41
7.4.220.0070.01116.68
7.4.210.0080.00816.61
7.4.200.0050.00316.68
7.4.160.0090.00916.58
7.4.150.0110.00717.40
7.4.140.0090.00917.86
7.4.130.0150.00316.55
7.4.120.0090.01216.52
7.4.110.0100.00716.42
7.4.100.0090.00916.54
7.4.90.0100.00716.43
7.4.80.0090.01219.39
7.4.70.0110.00616.46
7.4.60.0130.00616.55
7.4.50.0040.00816.45
7.4.40.0030.01416.44
7.4.30.0110.00516.57
7.4.00.0040.00714.86
7.3.330.0000.00513.25
7.3.320.0030.00313.01
7.3.310.0030.00316.32
7.3.300.0030.00316.31
7.3.290.0080.00616.27
7.3.280.0120.00616.27
7.3.270.0190.00417.40
7.3.260.0130.00716.51
7.3.240.0050.01216.39
7.3.230.0100.00716.53
7.3.210.0080.00816.45
7.3.200.0060.01216.35
7.3.190.0060.00916.24
7.3.180.0090.00916.25
7.3.170.0090.00916.33
7.3.160.0120.00316.33
7.2.330.0070.01016.61
7.2.320.0070.01316.66
7.2.310.0070.01016.36
7.2.300.0100.00716.43
7.2.290.0060.01316.43
7.2.60.0030.00716.93
7.1.200.0000.00915.89
7.1.70.0040.01117.19
7.1.60.0030.01017.25
7.1.50.1400.09338.92
7.1.40.1500.01332.44
7.1.30.1470.01332.42
7.1.20.1600.02732.71
7.1.10.1130.01014.74
7.1.00.1500.01014.46
7.0.200.0150.00316.88
7.0.190.1130.06020.24
7.0.180.0930.01314.25
7.0.170.1900.01714.21
7.0.160.1670.01014.09
7.0.150.1100.01714.44
7.0.140.1130.01014.41
7.0.130.1230.00714.53
7.0.120.1270.01014.47
7.0.110.1730.01314.30
7.0.100.2200.01314.21
7.0.90.1330.00714.33
7.0.80.1500.01014.33
7.0.70.1430.02014.53
7.0.60.1430.01014.07
7.0.50.2170.00314.62
7.0.40.1670.01314.46
7.0.30.1500.02014.57
7.0.20.1770.00014.66
7.0.10.1970.01014.44
7.0.00.1570.01314.54

preferences:
35.02 ms | 403 KiB | 5 Q