3v4l.org

run code in 300+ PHP versions simultaneously
<?php // just comment/uncomment to choose which $data you want to see in action // $data = array("kaushik","kaushik is","kaushik is great","is","is great","great"); $data = array("usb","pc","cam 168","cam","168"); $current = ""; for($i=0;$i<count($data);$i++) { $current=$data[$i]; for($j=0;$j<count($data);$j++) { if($i<>$j) { if((str_replace($data[$j],"",$current))!=$current) { $data[$j]=""; }; } } } for($i=0;$i<count($data);$i++) { if($data[$i]!="") { echo $data[$i]."\n"; } } ?>

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.0090.00618.18
8.3.50.0070.01122.05
8.3.40.0070.01018.67
8.3.30.0100.01019.09
8.3.20.0000.00720.35
8.3.10.0060.01222.09
8.3.00.0060.00322.46
8.2.180.0070.01316.50
8.2.170.0100.01022.96
8.2.160.0070.00720.90
8.2.150.0090.00624.18
8.2.140.0000.00724.66
8.2.130.0120.00626.16
8.2.120.0080.00019.38
8.2.110.0110.00020.38
8.2.100.0040.00819.63
8.2.90.0040.00418.96
8.2.80.0080.00017.97
8.2.70.0100.00017.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0050.00218.34
8.2.30.0030.00518.04
8.2.20.0050.00317.63
8.2.10.0030.00519.53
8.2.00.0030.00517.70
8.1.280.0030.01425.92
8.1.270.0000.00723.99
8.1.260.0150.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.83
8.1.230.0040.00718.94
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.00817.25
8.1.190.0080.00017.54
8.1.180.0090.00018.70
8.1.170.0000.00918.49
8.1.160.0000.00721.97
8.1.150.0080.00018.75
8.1.140.0000.00717.34
8.1.130.0000.00717.79
8.1.120.0070.00017.44
8.1.110.0050.00317.49
8.1.100.0000.00817.32
8.1.90.0040.00417.50
8.1.80.0040.00317.52
8.1.70.0050.00317.48
8.1.60.0000.00817.52
8.1.50.0050.00317.44
8.1.40.0000.00817.44
8.1.30.0040.00417.47
8.1.20.0040.00417.55
8.1.10.0080.00017.49
8.1.00.0050.00317.41
8.0.300.0070.00018.77
8.0.290.0080.00017.17
8.0.280.0000.00718.37
8.0.270.0040.00417.13
8.0.260.0040.00416.77
8.0.250.0000.00716.99
8.0.240.0070.00016.86
8.0.230.0000.00716.91
8.0.220.0070.00016.86
8.0.210.0050.00316.89
8.0.200.0060.00016.93
8.0.190.0030.00616.95
8.0.180.0000.00716.95
8.0.170.0000.00816.89
8.0.160.0040.00416.91
8.0.150.0080.00016.78
8.0.140.0070.00016.81
8.0.130.0070.00013.36
8.0.120.0050.00316.73
8.0.110.0000.00816.80
8.0.100.0000.00716.75
8.0.90.0030.00516.87
8.0.80.0070.00816.84
8.0.70.0040.00416.73
8.0.60.0040.00416.79
8.0.50.0080.00016.84
8.0.30.0090.01217.14
8.0.20.0070.01217.40
8.0.10.0000.00716.91
8.0.00.0090.01116.69
7.4.330.0000.00515.00
7.4.320.0060.00016.64
7.4.300.0030.00316.52
7.4.290.0000.00716.55
7.4.280.0000.00716.64
7.4.270.0070.00016.66
7.4.260.0070.00016.41
7.4.250.0040.00416.61
7.4.240.0060.00116.59
7.4.230.0040.00416.38
7.4.220.0100.00616.62
7.4.210.0030.01316.56
7.4.200.0030.00316.73
7.4.190.0070.00016.75
7.4.160.0100.00616.30
7.4.150.0100.00717.40
7.4.140.0110.00817.86
7.4.130.0080.00816.54
7.4.120.0100.00916.49
7.4.110.0110.00716.51
7.4.100.0090.00916.36
7.4.90.0160.00616.60
7.4.80.0140.00919.39
7.4.70.0030.01316.59
7.4.60.0090.01016.65
7.4.50.0060.00316.63
7.4.40.0060.00922.77
7.4.30.0170.00316.32
7.4.00.0040.00414.96
7.3.330.0030.00313.34
7.3.320.0020.00213.18
7.3.310.0040.00416.28
7.3.300.0030.00316.23
7.3.290.0060.00716.33
7.3.280.0070.00816.37
7.3.270.0140.00317.40
7.3.260.0080.01216.41
7.3.250.0070.01016.51
7.3.240.0070.01016.33
7.3.230.0030.01416.55
7.3.210.0120.00616.29
7.3.200.0080.00919.39
7.3.190.0040.01316.40
7.3.180.0070.01016.63
7.3.170.0080.00816.31
7.3.160.0030.01216.22
7.3.120.0070.00714.90
7.2.330.0030.01416.79
7.2.320.0090.01416.84
7.2.310.0140.00716.86
7.2.300.0070.01016.71
7.2.290.0060.00916.69
7.2.00.0000.01219.24
7.1.100.0030.01018.19
7.1.70.0060.00617.25
7.1.60.0070.01819.82
7.1.50.0030.01616.94
7.1.00.0000.08022.36
7.0.200.0000.00716.48
7.0.140.0070.07021.93
7.0.60.0270.07319.77
7.0.50.0130.06317.68
7.0.40.0030.06720.02
7.0.30.0370.06020.17
7.0.20.0400.07320.13
7.0.10.0200.05720.21
7.0.00.0100.05320.20
5.6.280.0000.07721.07
5.6.210.0170.06020.53
5.6.200.0000.05718.15
5.6.190.0070.05020.39
5.6.180.3830.04020.33
5.6.170.0300.07720.42
5.6.160.0030.06320.48
5.6.150.0070.05318.09
5.6.140.0030.04018.11
5.6.130.0070.06718.07
5.6.120.0170.06720.99
5.6.110.0070.08320.98
5.6.100.0030.04020.99
5.6.90.0170.07321.09
5.6.80.0170.03320.47
5.5.350.0270.07720.35
5.5.340.0030.04717.95
5.5.330.0130.04320.20
5.5.320.0230.05020.28
5.5.310.0300.08020.31
5.5.300.0100.07718.01
5.5.290.0030.08317.96
5.5.280.0100.04320.87
5.5.270.0070.08320.96
5.5.260.0070.07720.67
5.5.250.0200.03320.68
5.5.240.0230.06720.18
5.4.450.0530.05719.49
5.4.440.0470.05719.51
5.4.430.0100.05319.49
5.4.420.0130.05319.45
5.4.410.0170.05019.57
5.4.400.1630.00018.60
5.4.390.1730.00018.68
5.4.380.0200.05718.44
5.4.370.0070.05718.49
5.4.360.0230.05318.72
5.4.350.0270.05318.68
5.4.340.0400.04018.53
5.4.320.0050.03912.46
5.4.310.0060.03812.45
5.4.300.0110.03112.46
5.4.290.0060.03812.45
5.4.280.0090.04312.35
5.4.270.0070.05012.35
5.4.260.0330.05318.89
5.4.250.0200.06018.99
5.4.240.0100.05318.90
5.4.230.0070.05718.80
5.4.220.0100.05018.99
5.4.210.0030.05718.89
5.4.200.0070.05318.98
5.4.190.0000.06018.87
5.4.180.0070.05318.86
5.4.170.0000.06018.95
5.4.160.0030.06318.84
5.4.150.0100.05318.95
5.4.140.0130.06016.52
5.4.130.0100.05016.25
5.4.120.0070.05316.51
5.4.110.0070.06016.39
5.4.100.0070.07016.31
5.4.90.0100.04716.20
5.4.80.0100.04316.36
5.4.70.0100.05316.34
5.4.60.0100.04716.29
5.4.50.0030.05016.43
5.4.40.0070.04716.52
5.4.30.0030.06016.43
5.4.20.0130.04316.43
5.4.10.0100.04316.36
5.4.00.0170.05315.67
5.3.290.0060.04012.80
5.3.280.0000.05714.48
5.3.270.0170.04314.44
5.3.260.0070.07014.52
5.3.250.0070.05014.45
5.3.240.0030.06314.69
5.3.230.0070.05014.51
5.3.220.0100.04714.56
5.3.210.0000.06014.56
5.3.200.0130.04314.58
5.3.190.0130.04314.45
5.3.180.0100.04714.56
5.3.170.0100.06714.26
5.3.160.0200.04714.41
5.3.150.0030.06014.26
5.3.140.0030.05014.25
5.3.130.0070.06314.70
5.3.120.0000.06714.55
5.3.110.0130.04714.48
5.3.100.0030.05313.80
5.3.90.0070.05013.85
5.3.80.0000.05313.79
5.3.70.0070.05013.79
5.3.60.0070.05013.77
5.3.50.0170.03713.99
5.3.40.0100.06713.96
5.3.30.0200.03713.90
5.3.20.0030.07013.84
5.3.10.0030.05013.49
5.3.00.0000.05713.49
5.2.170.0070.03711.14
5.2.160.0000.04711.07
5.2.150.0170.04011.14
5.2.140.0030.04311.15
5.2.130.0130.03010.86
5.2.120.0070.03711.02
5.2.110.0170.02711.11
5.2.100.0100.03310.86
5.2.90.0100.03711.11
5.2.80.0100.04011.11
5.2.70.0100.05011.02
5.2.60.0130.03311.07
5.2.50.0000.04711.03
5.2.40.0030.04010.93
5.2.30.0000.04310.99
5.2.20.0070.03711.05
5.2.10.0000.04010.76
5.2.00.0070.03710.62
5.1.60.0070.05010.05
5.1.50.0070.03310.18
5.1.40.0000.04710.00
5.1.30.0070.05310.31
5.1.20.0130.03310.43
5.1.10.0070.0409.95
5.1.00.0130.03710.13
5.0.50.0100.0238.33
5.0.40.0000.0308.30
5.0.30.0070.0408.46
5.0.20.0030.0378.26
5.0.10.0070.0308.01
5.0.00.0070.0378.23
4.4.90.0070.0176.75
4.4.80.0100.0136.75
4.4.70.0030.0206.96
4.4.60.0030.0306.96
4.4.50.0000.0236.96
4.4.40.0100.0276.96
4.4.30.0070.0176.96
4.4.20.0070.0176.96
4.4.10.0030.0306.96
4.4.00.0030.0376.96
4.3.110.0000.0276.96
4.3.100.0030.0276.96
4.3.90.0030.0306.96
4.3.80.0000.0376.96
4.3.70.0100.0206.96
4.3.60.0030.0206.96
4.3.50.0070.0176.96
4.3.40.0030.0306.96
4.3.30.0070.0176.96
4.3.20.0000.0236.96
4.3.10.0030.0206.96
4.3.00.0030.0207.46

preferences:
36.6 ms | 401 KiB | 5 Q