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","cam 168"); $a = array_unique($a); $s = count($a) - 1; $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 == $s) array_push($print_following, $key); } } foreach ($print_following as $o => $value) { echo $a[$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.0120.00318.55
8.3.50.0110.00522.11
8.3.40.0110.00718.84
8.3.30.0070.00718.95
8.3.20.0040.00420.31
8.3.10.0050.00322.04
8.3.00.0040.00422.52
8.2.180.0160.00617.00
8.2.170.0170.00322.96
8.2.160.0140.00020.88
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0050.00319.22
8.2.110.0040.00422.13
8.2.100.0090.00319.64
8.2.90.0040.00419.25
8.2.80.0000.00817.97
8.2.70.0000.01117.75
8.2.60.0000.00918.16
8.2.50.0000.00918.07
8.2.40.0080.00018.34
8.2.30.0040.00418.00
8.2.20.0070.00017.62
8.2.10.0040.00419.54
8.2.00.0050.00317.75
8.1.280.0040.01525.92
8.1.270.0040.00422.06
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00423.84
8.1.230.0080.00319.16
8.1.220.0090.00017.78
8.1.210.0060.00318.77
8.1.200.0000.01017.22
8.1.190.0000.00717.51
8.1.180.0050.00318.71
8.1.170.0080.00018.46
8.1.160.0040.00421.95
8.1.150.0040.00418.66
8.1.140.0000.00717.41
8.1.130.0040.00417.80
8.1.120.0040.00417.45
8.1.110.0000.00817.46
8.1.100.0040.00417.36
8.1.90.0030.00317.34
8.1.80.0070.00017.49
8.1.70.0000.00717.40
8.1.60.0060.00317.61
8.1.50.0000.00717.52
8.1.40.0040.00417.44
8.1.30.0080.00017.49
8.1.20.0030.00617.67
8.1.10.0000.00717.61
8.1.00.0080.00017.51
8.0.300.0000.00718.77
8.0.290.0000.00817.04
8.0.280.0030.00318.34
8.0.270.0070.00017.28
8.0.260.0040.00416.83
8.0.250.0030.00316.89
8.0.240.0040.00416.92
8.0.230.0030.00316.89
8.0.220.0040.00416.95
8.0.210.0000.00716.93
8.0.200.0070.00017.05
8.0.190.0000.00716.88
8.0.180.0000.00716.91
8.0.170.0040.00416.92
8.0.160.0040.00416.91
8.0.150.0030.00316.76
8.0.140.0030.00316.91
8.0.130.0000.00613.43
8.0.120.0070.00016.87
8.0.110.0080.00016.80
8.0.100.0040.00416.74
8.0.90.0020.00516.97
8.0.80.0080.00516.96
8.0.70.0070.00016.93
8.0.60.0030.00516.95
8.0.50.0000.00716.88
8.0.30.0110.00816.95
8.0.20.0100.01717.40
8.0.10.0040.00416.91
8.0.00.0100.00916.65
7.4.330.0050.00015.02
7.4.320.0000.00616.62
7.4.300.0050.00316.49
7.4.290.0000.00716.48
7.4.280.0040.00416.49
7.4.270.0000.00716.40
7.4.260.0080.00016.54
7.4.250.0000.00816.45
7.4.240.0040.00316.56
7.4.230.0000.00816.60
7.4.220.0000.01816.62
7.4.210.0100.00616.57
7.4.200.0000.00716.60
7.4.190.0030.00316.45
7.4.160.0040.02016.35
7.4.150.0130.00717.40
7.4.140.0070.01217.86
7.4.130.0130.00716.51
7.4.120.0110.00516.43
7.4.110.0070.01116.46
7.4.100.0140.00316.58
7.4.90.0140.00416.43
7.4.80.0160.00319.39
7.4.70.0070.01016.48
7.4.60.0080.00916.45
7.4.50.0030.00616.50
7.4.40.0060.00922.77
7.4.30.0100.00616.35
7.4.00.0070.01114.79
7.3.330.0030.00313.17
7.3.320.0000.00513.16
7.3.310.0040.00416.37
7.3.300.0000.00716.35
7.3.290.0120.00316.23
7.3.280.0100.00616.28
7.3.270.0070.01117.40
7.3.260.0100.00616.60
7.3.250.0070.01016.48
7.3.240.0140.00716.34
7.3.230.0060.01116.41
7.3.210.0080.00916.49
7.3.200.0090.01219.39
7.3.190.0060.01116.40
7.3.180.0030.01316.50
7.3.170.0140.00616.34
7.3.160.0090.00916.34
7.3.120.0120.00014.91
7.3.10.0080.01516.06
7.3.00.0120.00716.25
7.2.330.0100.01016.63
7.2.320.0060.00916.84
7.2.310.0100.00716.82
7.2.300.0110.00616.79
7.2.290.0120.00316.86
7.2.130.0210.00716.25
7.2.120.0130.00516.54
7.2.110.0040.00716.98
7.2.100.0040.01316.61
7.2.90.0180.00316.12
7.2.80.0090.00916.34
7.2.70.0290.00616.39
7.2.60.0130.00416.27
7.2.50.0120.00616.38
7.2.40.0100.00616.47
7.2.30.0000.01116.51
7.2.20.0120.00616.58
7.2.10.0090.01216.52
7.2.00.0090.00718.02
7.1.250.0070.01015.28
7.1.100.0000.01118.30
7.1.70.0070.00016.92
7.1.60.0040.01919.82
7.1.50.0070.01416.98
7.1.00.0030.07322.33
7.0.200.0060.00616.72
7.0.140.0070.07022.01
7.0.60.0030.08019.93
7.0.50.0100.05717.89
7.0.40.0030.05320.03
7.0.30.0300.08320.10
7.0.20.0200.09020.00
7.0.10.0270.08020.00
7.0.00.0070.08320.14
5.6.280.0030.07320.82
5.6.210.0100.06720.63
5.6.200.0100.03318.09
5.6.190.0100.08020.77
5.6.180.3630.04020.35
5.6.170.0230.07720.35
5.6.160.0070.08720.51
5.6.150.0030.04318.08
5.6.140.0070.06318.18
5.6.130.0070.06718.19
5.6.120.0130.08721.00
5.6.110.0100.05720.90
5.6.100.0070.08320.96
5.6.90.0100.07720.95
5.6.80.0200.06020.54
5.6.70.0330.07020.52
5.5.350.0030.08020.53
5.5.340.0170.06017.98
5.5.330.0100.05020.40
5.5.320.0300.07020.17
5.5.310.0330.06020.25
5.5.300.0130.07017.95
5.5.290.0030.06017.98
5.5.280.0070.05320.77
5.5.270.0070.05020.77
5.5.260.0070.06320.89
5.5.250.0270.07020.59
5.5.240.0030.07020.24
5.4.450.0470.05719.41
5.4.440.0630.05319.64
5.4.430.0070.06019.30
5.4.420.0030.06719.68
5.4.410.0170.07019.42
5.4.400.0900.00018.59
5.4.390.0630.00018.59
5.4.380.0230.05718.68
5.4.370.0400.04718.61
5.4.360.0370.05318.68
5.4.350.0370.04718.70
5.4.340.0300.05318.68
5.4.320.0070.05212.47
5.4.310.0040.04212.46
5.4.300.0050.03712.46
5.4.290.0030.04012.46
5.4.280.0040.03812.36
5.4.270.0040.03812.36
5.4.260.0130.05018.84
5.4.250.0030.05718.90
5.4.240.0030.05718.69
5.4.230.0030.05718.69
5.4.220.0100.05318.96
5.4.210.0100.05018.83
5.4.200.0070.05718.80
5.4.190.0100.05018.61
5.4.180.0100.05018.61
5.4.170.0070.05018.85
5.4.160.0200.04018.69
5.4.150.0070.05318.96
5.4.140.0100.05316.46
5.4.130.0070.04716.27
5.4.120.0070.05016.24
5.4.110.0070.07716.49
5.4.100.0130.06016.31
5.4.90.0070.05016.34
5.4.80.0070.05016.38
5.4.70.0100.04716.39
5.4.60.0070.05016.23
5.4.50.0000.05316.38
5.4.40.0070.05316.27
5.4.30.0100.04716.16
5.4.20.0030.05316.43
5.4.10.0130.05016.40
5.4.00.0100.07015.87
5.3.290.0080.03612.80
5.3.280.0070.05014.70
5.3.270.0130.05014.49
5.3.260.0100.05014.32
5.3.250.0030.05314.61
5.3.240.0030.05714.61
5.3.230.0070.05314.49
5.3.220.0130.05014.58
5.3.210.0170.06314.45
5.3.200.0130.06014.43
5.3.190.0030.05314.57
5.3.180.0100.05014.72
5.3.170.0100.04714.35
5.3.160.0070.07014.43
5.3.150.0030.05314.58
5.3.140.0000.05714.58
5.3.130.0100.05014.43
5.3.120.0130.04714.45
5.3.110.0030.05714.44
5.3.100.0030.05313.74
5.3.90.0030.05014.18
5.3.80.0170.04014.04
5.3.70.0130.04713.95
5.3.60.0100.06313.89
5.3.50.0000.07313.89
5.3.40.0030.07314.00
5.3.30.0070.06014.07
5.3.20.0170.03713.64
5.3.10.0030.05013.54
5.3.00.0130.04713.74
5.2.170.0000.06011.16
5.2.160.0030.04311.16
5.2.150.0170.03011.04
5.2.140.0100.03711.07
5.2.130.0030.04011.04
5.2.120.0030.04011.13
5.2.110.0000.04311.00
5.2.100.0070.05011.02
5.2.90.0130.03011.11
5.2.80.0070.04011.13
5.2.70.0030.04311.11
5.2.60.0030.05710.99
5.2.50.0070.04010.97
5.2.40.0030.04011.01
5.2.30.0000.04710.77
5.2.20.0030.04010.99
5.2.10.0070.04010.80
5.2.00.0000.04310.73
5.1.60.0070.04710.16
5.1.50.0070.0309.91
5.1.40.0030.0339.89
5.1.30.0100.03010.56
5.1.20.0100.03310.20
5.1.10.0030.03710.22
5.1.00.0030.0509.98
5.0.50.0100.0308.47
5.0.40.0070.0338.32
5.0.30.0070.0378.26
5.0.20.0030.0278.15
5.0.10.0000.0308.27
5.0.00.0000.0438.28
4.4.90.0000.0306.98
4.4.80.0000.0236.98
4.4.70.0030.0206.98
4.4.60.0030.0276.98
4.4.50.0030.0236.98
4.4.40.0070.0306.98
4.4.30.0070.0276.98
4.4.20.0030.0206.98
4.4.10.0030.0206.98
4.4.00.0000.0376.98
4.3.110.0070.0276.98
4.3.100.0070.0176.98
4.3.90.0030.0206.97
4.3.80.0030.0336.96
4.3.70.0000.0236.96
4.3.60.0100.0136.96
4.3.50.0000.0236.96
4.3.40.0000.0336.96
4.3.30.0000.0236.96
4.3.20.0030.0206.96
4.3.10.0070.0206.96
4.3.00.0100.0207.46

preferences:
38 ms | 401 KiB | 5 Q