3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_delete($array, $element) { return array_diff($array, [$element]); } $profiles = array('1', '2', 'patient'); if (in_array('patient', $profiles) ){ echo 'yesy'; array_delete($profiles, 'patient'); } var_dump($profiles);

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.3.60.0130.00718.43
8.3.50.0100.01021.93
8.3.40.0070.00718.57
8.3.30.0100.00720.04
8.3.20.0000.00720.39
8.3.10.0050.00322.09
8.3.00.0080.00022.29
8.2.180.0180.00316.32
8.2.170.0070.00722.96
8.2.160.0070.00720.14
8.2.150.0030.00624.18
8.2.140.0110.00424.66
8.2.130.0120.00626.16
8.2.120.0000.00819.66
8.2.110.0030.00622.05
8.2.100.0030.00917.84
8.2.90.0040.00417.88
8.2.80.0000.00819.29
8.2.70.0000.00817.92
8.2.60.0000.00817.93
8.2.50.0030.00618.10
8.2.40.0000.00820.61
8.2.30.0070.00418.10
8.2.20.0000.00717.70
8.2.10.0080.00017.59
8.2.00.0070.00417.66
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00420.81
8.1.230.0000.01119.10
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0000.00917.34
8.1.190.0030.00617.22
8.1.180.0070.00018.10
8.1.170.0060.00318.49
8.1.160.0040.00422.08
8.1.150.0040.00418.53
8.1.140.0040.00417.43
8.1.130.0080.00017.75
8.1.120.0000.00717.45
8.1.110.0030.00517.45
8.1.100.0020.00517.41
8.1.90.0050.00317.34
8.1.80.0040.00417.32
8.1.70.0030.00317.42
8.1.60.0000.00817.48
8.1.50.0040.00417.45
8.1.40.0000.00717.40
8.1.30.0040.00417.52
8.1.20.0030.00617.66
8.1.10.0030.00617.55
8.1.00.0030.00617.46
8.0.300.0070.00019.64
8.0.290.0040.00416.75
8.0.280.0070.00018.30
8.0.270.0000.00817.25
8.0.260.0060.00016.76
8.0.250.0000.00716.82
8.0.240.0040.00416.85
8.0.230.0030.00316.96
8.0.220.0050.00216.84
8.0.210.0070.00016.94
8.0.200.0000.00616.83
8.0.190.0040.00416.88
8.0.180.0040.00416.98
8.0.170.0090.00016.76
8.0.160.0000.00716.85
8.0.150.0000.00716.89
8.0.140.0000.00716.80
8.0.130.0000.00613.35
8.0.120.0060.00316.86
8.0.110.0000.00716.86
8.0.100.0080.00016.82
8.0.90.0040.00416.71
8.0.80.0050.01316.86
8.0.70.0000.00716.89
8.0.60.0070.00016.70
8.0.50.0050.00316.78
8.0.30.0130.00717.11
8.0.20.0070.01317.40
8.0.10.0000.00716.89
8.0.00.0110.00616.77
7.4.330.0020.00215.00
7.4.320.0000.00716.50
7.4.300.0000.00616.54
7.4.290.0030.00316.47
7.4.280.0000.00716.49
7.4.270.0030.00716.41
7.4.260.0030.00316.56
7.4.250.0000.00816.40
7.4.240.0030.00316.58
7.4.230.0030.00316.39
7.4.220.0040.01416.66
7.4.210.0060.00916.59
7.4.200.0000.00716.38
7.4.190.0070.00016.68
7.4.160.0070.01016.40
7.4.150.0120.00617.40
7.4.140.0110.00717.86
7.4.130.0140.00216.65
7.4.120.0080.00916.43
7.4.110.0090.00916.57
7.4.100.0090.00916.57
7.4.90.0180.00316.43
7.4.80.0060.01619.39
7.4.70.0110.00616.47
7.4.60.0120.00616.35
7.4.50.0040.00416.52
7.4.40.0060.00822.77
7.4.30.0070.01016.39
7.4.00.0050.01214.83
7.3.330.0030.00313.21
7.3.320.0020.00213.36
7.3.310.0000.00716.28
7.3.300.0030.00316.16
7.3.290.0090.00616.27
7.3.280.0090.00816.33
7.3.270.0080.00817.40
7.3.260.0090.00916.57
7.3.250.0080.01316.38
7.3.240.0090.00916.56
7.3.230.0080.00816.45
7.3.210.0130.00316.38
7.3.200.0070.01019.39
7.3.190.0190.00016.51
7.3.180.0070.01016.39
7.3.170.0100.00716.38
7.3.160.0140.00316.47
7.3.120.0080.01114.82
7.3.110.0090.01014.77
7.3.100.0130.00314.83
7.3.90.0100.00714.80
7.3.80.0070.00414.74
7.3.70.0060.00614.41
7.3.60.0060.00314.71
7.3.50.0060.00914.82
7.3.40.0070.00714.65
7.3.30.0030.01014.65
7.3.20.0100.00716.58
7.3.10.0090.00616.67
7.3.00.0100.00616.55
7.2.330.0060.01216.72
7.2.320.0170.00016.67
7.2.310.0040.01216.63
7.2.300.0110.00516.48
7.2.290.0130.01016.52
7.2.250.0070.01115.01
7.2.240.0100.00614.77
7.2.230.0160.00315.12
7.2.220.0030.01514.86
7.2.210.0040.00414.76
7.2.200.0000.01414.96
7.2.190.0000.01514.92
7.2.180.0040.00714.97
7.2.170.0040.00814.88
7.2.00.0060.00619.46
7.1.330.0040.00715.92
7.1.320.0060.00315.80
7.1.310.0040.00715.65
7.1.300.0030.01015.77
7.1.290.0060.00615.47
7.1.280.0070.01015.62
7.1.270.0070.00715.67
7.1.260.0030.00615.52
7.1.100.0000.01418.22
7.1.70.0030.00517.18
7.1.60.0110.01419.21
7.1.50.0150.01116.82
7.1.00.0070.07322.48
7.0.200.0190.00314.80
7.0.140.0100.07021.93
7.0.60.0030.09020.01
7.0.50.0100.08017.73
7.0.40.0030.04720.21
7.0.30.0200.04720.11
7.0.20.0200.04020.07
7.0.10.0100.05720.33
7.0.00.0000.04320.11
5.6.280.0130.06021.07
5.6.210.0030.05720.70
5.6.200.0000.04718.28
5.6.190.0070.08720.46
5.6.180.0230.04020.52
5.6.170.0230.06320.58
5.6.160.0070.08720.48
5.6.150.0100.07018.29
5.6.140.0200.03718.21
5.6.130.0030.05318.18
5.6.120.0170.07721.12
5.6.110.0100.08021.13
5.6.100.0070.08321.00
5.6.90.0200.06321.11
5.6.80.0030.03720.39
5.5.350.3330.04020.38
5.5.340.0030.06717.99
5.5.330.0030.04320.21
5.5.320.0330.07020.30
5.5.310.0470.06720.31
5.5.300.0030.08017.97
5.5.290.0000.04317.98
5.5.280.0100.08320.77
5.5.270.0100.08020.93
5.5.260.0100.08020.80
5.5.250.0070.08720.77
5.5.240.0000.03320.23
5.4.450.0270.05019.20
5.4.440.0430.03319.28
5.4.430.0270.04019.47
5.4.420.0570.04719.31
5.4.410.0330.04319.19
5.4.400.0500.06719.23
5.4.390.0170.04019.09
5.4.380.0370.08018.72
5.4.370.0430.06018.79
5.4.360.0400.06018.70
5.4.350.0370.06318.75
5.4.340.0370.08318.78
5.4.320.0060.03912.50
5.4.310.0050.03812.50
5.4.300.0050.04412.50
5.4.290.0080.04512.50
5.4.280.0100.03212.40
5.4.270.0050.04212.39
5.4.260.0100.06719.00
5.4.250.0170.04718.74
5.4.240.0030.05718.93
5.4.230.0100.05719.10
5.4.220.0170.04718.65
5.4.210.0100.05318.79
5.4.200.0100.05018.76
5.4.190.0130.05018.97
5.4.180.0270.03318.65
5.4.170.0100.05718.95
5.4.160.0130.05018.71
5.4.150.0130.06718.99
5.4.140.0100.05316.54
5.4.130.0000.05716.47
5.4.120.0070.05316.38
5.4.110.0130.05016.41
5.4.100.0070.05716.55
5.4.90.0070.06016.51
5.4.80.0100.04316.53
5.4.70.0170.06716.52
5.4.60.0030.05316.38
5.4.50.0170.04016.52
5.4.40.0070.05316.46
5.4.30.0030.05316.46
5.4.20.0100.05016.43
5.4.10.0170.07016.48
5.4.00.0130.06015.98
5.3.290.0090.04412.80
5.3.280.0030.05714.72
5.3.270.0130.04714.68
5.3.260.0170.06014.59
5.3.250.0130.05014.59
5.3.240.0170.04714.68
5.3.230.0070.05014.77
5.3.220.0170.04314.79
5.3.210.0070.06014.39
5.3.200.0070.05314.65
5.3.190.0130.05714.73
5.3.180.0100.04714.56
5.3.170.0230.03314.72
5.3.160.0070.05014.79
5.3.150.0130.04714.55
5.3.140.0030.05314.55
5.3.130.0030.05714.56
5.3.120.0170.04314.45
5.3.110.0030.08014.70
5.3.100.0070.05313.95
5.3.90.0030.05714.11
5.3.80.0070.07014.20
5.3.70.0070.05314.00
5.3.60.0100.04714.09
5.3.50.0130.04713.96
5.3.40.0070.06313.96
5.3.30.0070.05713.99
5.3.20.0170.04313.77
5.3.10.0200.03313.48
5.3.00.0070.06013.47
5.2.170.0000.05011.21
5.2.160.0070.04011.22
5.2.150.0070.04311.14
5.2.140.0100.03711.09
5.2.130.0030.04011.18
5.2.120.0100.03311.27
5.2.110.0130.04311.32
5.2.100.0030.06011.17
5.2.90.0000.04711.16
5.2.80.0000.06011.17
5.2.70.0000.04711.16
5.2.60.0070.04311.14
5.2.50.0030.06311.09
5.2.40.0030.04010.97
5.2.30.0000.05311.04
5.2.20.0070.04010.96
5.2.10.0070.03710.94
5.2.00.0100.03710.72
5.1.60.0030.0339.91
5.1.50.0070.0339.97
5.1.40.0030.05010.17
5.1.30.0030.03710.51
5.1.20.0070.03310.54
5.1.10.0100.03010.13
5.1.00.0070.03310.15
5.0.50.0030.0378.52
5.0.40.0070.0238.62
5.0.30.0000.0478.37
5.0.20.0070.0378.16
5.0.10.0030.0278.09
5.0.00.0070.0408.35
4.4.90.0030.0207.35
4.4.80.0030.0237.35
4.4.70.0100.0137.35
4.4.60.0100.0137.35
4.4.50.0100.0237.35
4.4.40.0070.0277.35
4.4.30.0030.0237.35
4.4.20.0030.0207.35
4.4.10.0030.0207.35
4.4.00.0000.0437.35
4.3.110.0000.0307.35
4.3.100.0000.0277.35
4.3.90.0000.0337.35
4.3.80.0030.0437.35
4.3.70.0070.0177.35
4.3.60.0070.0177.35
4.3.50.0000.0237.35
4.3.40.0000.0507.35
4.3.30.0100.0137.35
4.3.20.0030.0207.35
4.3.10.0070.0277.35
4.3.00.0070.01714.48

preferences:
57.28 ms | 400 KiB | 5 Q