3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'kaushik', 'kaushik is', 'kaushik is great', 'is', 'is great', 'great' ); // $a = array("usb","pc","cam 168","cam","168"); $print_following = array(); foreach ($a as $key => $b) { $x = 0; for ($i = 0; $i < count($a); $i++) { $c = $a; unset($c[$key]); if ($key == $i) continue; if (strpos($c[$i], $b) === false) { $x++; } if ($x == count($a) - 1) { if (!in_array($i, $print_following)) { array_push($print_following, $key); } } } } foreach ($a as $key => $value) { if (in_array($key, $print_following)) { echo $value.' '; } }

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.0190.00016.50
8.3.50.0070.01621.95
8.3.40.0070.00718.58
8.3.30.0070.00719.24
8.3.20.0070.00720.20
8.3.10.0090.00022.05
8.3.00.0040.00422.45
8.2.180.0070.00716.46
8.2.170.0110.00422.96
8.2.160.0070.01420.98
8.2.150.0060.00324.18
8.2.140.0140.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00319.36
8.2.110.0090.00022.24
8.2.100.0060.00619.64
8.2.90.0000.00819.40
8.2.80.0040.00417.97
8.2.70.0050.00517.75
8.2.60.0040.00417.91
8.2.50.0030.00618.07
8.2.40.0050.00218.22
8.2.30.0070.00318.20
8.2.20.0000.00817.72
8.2.10.0040.00419.59
8.2.00.0040.00417.74
8.1.280.0070.00725.92
8.1.270.0070.00022.03
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0080.00423.95
8.1.230.0070.00319.07
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.51
8.1.180.0040.00418.56
8.1.170.0000.00818.61
8.1.160.0000.00722.14
8.1.150.0060.00318.69
8.1.140.0040.00417.37
8.1.130.0030.00317.71
8.1.120.0000.00817.48
8.1.110.0070.00417.37
8.1.100.0050.00217.52
8.1.90.0000.00817.52
8.1.80.0040.00417.49
8.1.70.0030.00317.32
8.1.60.0000.01017.59
8.1.50.0040.00417.41
8.1.40.0040.00417.55
8.1.30.0030.00617.53
8.1.20.0040.00417.69
8.1.10.0050.00317.48
8.1.00.0000.00717.39
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0000.00718.50
8.0.270.0000.00817.22
8.0.260.0000.00616.83
8.0.250.0000.00716.88
8.0.240.0000.00816.98
8.0.230.0000.00716.97
8.0.220.0000.00716.94
8.0.210.0000.00716.76
8.0.200.0000.00716.82
8.0.190.0000.00717.00
8.0.180.0060.00316.88
8.0.170.0050.00316.79
8.0.160.0040.00416.92
8.0.150.0030.00316.88
8.0.140.0000.00916.89
8.0.130.0030.00313.29
8.0.120.0030.00516.89
8.0.110.0000.00716.76
8.0.100.0000.00716.94
8.0.90.0040.00416.79
8.0.80.0050.01016.84
8.0.70.0040.00416.97
8.0.60.0070.00016.73
8.0.50.0040.00416.85
8.0.30.0120.00817.20
8.0.20.0170.00217.40
8.0.10.0050.00216.86
8.0.00.0090.00916.91
7.4.330.0030.00315.08
7.4.320.0030.00316.58
7.4.300.0060.00016.50
7.4.290.0000.00716.43
7.4.280.0030.00316.64
7.4.270.0030.00316.66
7.4.260.0000.00816.59
7.4.250.0080.00016.48
7.4.240.0030.00516.50
7.4.230.0070.00016.30
7.4.220.0100.00716.56
7.4.210.0100.00616.50
7.4.200.0070.00016.48
7.4.190.0000.00716.76
7.4.160.0060.01016.51
7.4.150.0070.01117.40
7.4.140.0060.01117.86
7.4.130.0080.01016.43
7.4.120.0090.00916.57
7.4.110.0090.01316.63
7.4.100.0090.00916.44
7.4.90.0150.00316.39
7.4.80.0090.01219.39
7.4.70.0060.01016.55
7.4.60.0130.01016.52
7.4.50.0090.00016.21
7.4.40.0030.00922.77
7.4.30.0100.00616.64
7.4.00.0030.01314.91
7.3.330.0050.00013.20
7.3.320.0060.00013.12
7.3.310.0030.00316.46
7.3.300.0070.00016.34
7.3.290.0140.00016.38
7.3.280.0090.00716.34
7.3.270.0100.00717.40
7.3.260.0100.01016.29
7.3.250.0100.00916.36
7.3.240.0100.01016.47
7.3.230.0110.00816.45
7.3.210.0100.00716.48
7.3.200.0100.00619.39
7.3.190.0130.00716.61
7.3.180.0100.00716.48
7.3.170.0100.00616.43
7.3.160.0130.00316.43
7.3.120.0040.01114.82
7.3.10.0100.00716.17
7.3.00.0070.01016.22
7.2.330.0130.00616.77
7.2.320.0100.00616.82
7.2.310.0060.01616.88
7.2.300.0070.01016.78
7.2.290.0060.01016.81
7.2.130.0090.00616.88
7.2.120.0110.00316.86
7.2.110.0080.00816.92
7.2.100.0070.00717.08
7.2.90.0040.01117.10
7.2.80.0000.00916.63
7.2.70.0090.00316.93
7.2.60.0090.00616.91
7.2.50.0080.00516.94
7.2.40.0100.00317.13
7.2.30.0000.01416.89
7.2.20.0030.00916.42
7.2.10.0030.01017.15
7.2.00.0030.01018.13
7.1.250.0030.00915.48
7.1.100.0000.01318.31
7.1.70.0030.01317.09
7.1.60.0100.01319.82
7.1.50.0000.01116.68
7.1.00.0030.07722.56
7.0.200.0000.00916.52
7.0.140.0030.07322.08
7.0.60.0030.07319.98
7.0.50.0100.08017.66
7.0.40.0100.08320.24
7.0.30.0370.07320.21
7.0.20.0370.07020.16
7.0.10.0300.04320.31
7.0.00.0100.07320.08
5.6.280.0070.07021.04
5.6.210.0030.04020.52
5.6.200.0030.05318.21
5.6.190.0070.04320.36
5.6.180.4130.04320.48
5.6.170.0300.03720.37
5.6.160.0100.04320.40
5.6.150.0030.06318.08
5.6.140.0070.04018.13
5.6.130.0070.03718.15
5.6.120.0000.09721.10
5.6.110.0100.08021.00
5.6.100.0000.04321.06
5.6.90.0070.08721.08
5.6.80.0130.06320.48
5.6.70.0330.07020.28
5.5.350.0000.09720.45
5.5.340.0030.08717.91
5.5.330.0100.07720.07
5.5.320.0200.08720.24
5.5.310.0430.06720.28
5.5.300.0100.07318.01
5.5.290.0100.03317.98
5.5.280.0100.05720.91
5.5.270.0030.09020.73
5.5.260.0130.03720.80
5.5.250.0170.07020.79
5.5.240.0170.07020.29
5.4.450.0500.07719.28
5.4.440.0530.05019.32
5.4.430.0100.06719.53
5.4.420.0170.05019.30
5.4.410.0130.05319.22
5.4.400.2070.00018.75
5.4.390.1700.00018.51
5.4.380.0230.06018.72
5.4.370.0270.05018.63
5.4.360.0300.04318.64
5.4.350.0330.05018.59
5.4.340.0470.04018.70
5.4.320.0090.03412.46
5.4.310.0040.04412.46
5.4.300.0070.03712.47
5.4.290.0080.03812.46
5.4.280.0080.04212.36
5.4.270.0060.03712.36
5.4.260.0100.06018.84
5.4.250.0130.05018.82
5.4.240.0030.05718.88
5.4.230.0070.05018.86
5.4.220.0030.05718.96
5.4.210.0200.05018.61
5.4.200.0170.06018.76
5.4.190.0070.05318.73
5.4.180.0100.05018.74
5.4.170.0200.06018.98
5.4.160.0070.05718.60
5.4.150.0030.05718.85
5.4.140.0100.04716.26
5.4.130.0030.05316.29
5.4.120.0100.04716.28
5.4.110.0100.05316.20
5.4.100.0070.05016.17
5.4.90.0000.05316.38
5.4.80.0100.06716.36
5.4.70.0200.03716.31
5.4.60.0170.06316.38
5.4.50.0070.04716.20
5.4.40.0130.04316.39
5.4.30.0030.07016.42
5.4.20.0070.05316.34
5.4.10.0230.03716.39
5.4.00.0130.04315.71
5.3.290.0070.04212.80
5.3.280.0100.06714.49
5.3.270.0130.06014.47
5.3.260.0070.05314.63
5.3.250.0170.04014.45
5.3.240.0200.06314.45
5.3.230.0170.04014.62
5.3.220.0030.06314.58
5.3.210.0070.06014.57
5.3.200.0100.06314.45
5.3.190.0100.05314.42
5.3.180.0070.07314.34
5.3.170.0130.04314.73
5.3.160.0030.05314.62
5.3.150.0030.07014.27
5.3.140.0030.05014.61
5.3.130.0030.05314.43
5.3.120.0100.05014.57
5.3.110.0130.04714.43
5.3.100.0100.05314.05
5.3.90.0070.05014.05
5.3.80.0070.05013.72
5.3.70.0030.06014.02
5.3.60.0100.04713.95
5.3.50.0200.04714.05
5.3.40.0030.05714.11
5.3.30.0000.07713.79
5.3.20.0030.06313.62
5.3.10.0100.04313.67
5.3.00.0100.07013.59
5.2.170.0030.04711.25
5.2.160.0030.06011.05
5.2.150.0000.04711.06
5.2.140.0170.05311.26
5.2.130.0070.04011.13
5.2.120.0030.04011.13
5.2.110.0100.03311.13
5.2.100.0070.03711.13
5.2.90.0030.04311.10
5.2.80.0030.04310.98
5.2.70.0030.04311.20
5.2.60.0000.05711.00
5.2.50.0030.04310.92
5.2.40.0070.03711.03
5.2.30.0100.03311.13
5.2.20.0070.03711.08
5.2.10.0130.03011.09
5.2.00.0000.04310.73
5.1.60.0070.0309.89
5.1.50.0030.03710.05
5.1.40.0100.0279.84
5.1.30.0030.05710.27
5.1.20.0030.05310.45
5.1.10.0130.02710.14
5.1.00.0100.04710.15
5.0.50.0030.0308.41
5.0.40.0100.0238.48
5.0.30.0030.0438.30
5.0.20.0000.0308.20
5.0.10.0070.0238.16
5.0.00.0070.0378.21
4.4.90.0000.0237.00
4.4.80.0000.0237.00
4.4.70.0030.0207.00
4.4.60.0030.0277.00
4.4.50.0070.0207.00
4.4.40.0030.0337.00
4.4.30.0000.0237.00
4.4.20.0030.0277.00
4.4.10.0030.0207.00
4.4.00.0030.0337.00
4.3.110.0070.0277.00
4.3.100.0030.0207.00
4.3.90.0030.0207.00
4.3.80.0000.0377.00
4.3.70.0000.0237.00
4.3.60.0030.0207.00
4.3.50.0030.0207.00
4.3.40.0030.0307.00
4.3.30.0000.0237.00
4.3.20.0030.0207.00
4.3.10.0000.0237.00
4.3.00.0100.0237.46

preferences:
41.76 ms | 401 KiB | 5 Q