3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mysort($a,$b){ return strlen($b)-strlen($a); } //$data = array("kaushik","kaushik is","kaushik is great","is","is great","great"); $data = array("usb","pc","cam 168","cam","168"); usort($data,'mysort'); // print_r($data); $current = ""; for($i=0;$i<count($data);$i++) { $current=$data[$i]; for($j=0;$j<count($data);$j++) { if($i<>$j) { $current=trim(str_replace($data[$j],"",$current)); } } if ($current!="") { echo $current; //echo $i.":".$data[$i]."\n"; // break; } } ?>

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.0100.00716.63
8.3.50.0060.01122.05
8.3.40.0090.00618.84
8.3.30.0110.00719.17
8.3.20.0030.00520.15
8.3.10.0070.00022.17
8.3.00.0040.00422.25
8.2.180.0070.00716.63
8.2.170.0120.00622.96
8.2.160.0090.00920.89
8.2.150.0080.00024.18
8.2.140.0120.00624.66
8.2.130.0050.00526.16
8.2.120.0050.00317.50
8.2.110.0070.00422.31
8.2.100.0080.00419.45
8.2.90.0060.00319.35
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0040.00418.09
8.2.30.0100.00018.27
8.2.20.0000.01117.69
8.2.10.0040.00419.55
8.2.00.0040.00417.77
8.1.280.0080.00625.92
8.1.270.0040.00422.19
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.80
8.1.230.0110.00019.10
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0120.00017.13
8.1.190.0040.00417.66
8.1.180.0040.00418.53
8.1.170.0030.00518.70
8.1.160.0040.00422.14
8.1.150.0000.00818.72
8.1.140.0000.00817.50
8.1.130.0030.00317.66
8.1.120.0030.00417.40
8.1.110.0030.00717.45
8.1.100.0000.00717.47
8.1.90.0070.00017.48
8.1.80.0050.00317.54
8.1.70.0030.00317.49
8.1.60.0030.00617.58
8.1.50.0000.00817.57
8.1.40.0040.00417.51
8.1.30.0040.00417.61
8.1.20.0040.00417.68
8.1.10.0050.00317.49
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0030.00318.44
8.0.270.0000.00717.33
8.0.260.0000.00616.89
8.0.250.0000.00716.96
8.0.240.0070.00017.06
8.0.230.0040.00416.95
8.0.220.0070.00016.96
8.0.210.0070.00016.93
8.0.200.0030.00316.79
8.0.190.0000.00716.78
8.0.180.0000.00716.84
8.0.170.0050.00216.87
8.0.160.0000.00716.80
8.0.150.0000.00716.87
8.0.140.0040.00416.78
8.0.130.0000.00513.34
8.0.120.0050.00316.85
8.0.110.0020.00516.80
8.0.100.0000.00716.69
8.0.90.0070.00016.96
8.0.80.0030.01116.95
8.0.70.0040.00416.77
8.0.60.0070.00016.87
8.0.50.0050.00316.76
8.0.30.0100.01017.00
8.0.20.0080.01117.40
8.0.10.0000.00817.13
8.0.00.0060.01516.95
7.4.330.0020.00215.02
7.4.320.0030.00316.53
7.4.300.0030.00316.43
7.4.290.0030.00316.63
7.4.280.0000.00716.61
7.4.270.0030.00316.57
7.4.260.0030.00316.56
7.4.250.0080.00016.54
7.4.240.0030.00516.56
7.4.230.0060.00316.55
7.4.220.0090.00916.48
7.4.210.0130.00416.56
7.4.200.0040.00416.70
7.4.190.0030.00316.55
7.4.160.0130.00316.36
7.4.150.0060.01117.40
7.4.140.0120.00617.86
7.4.130.0130.00616.54
7.4.120.0070.01116.48
7.4.110.0060.01116.47
7.4.100.0130.01016.44
7.4.90.0090.00916.53
7.4.80.0130.00419.39
7.4.70.0100.00716.38
7.4.60.0120.00816.32
7.4.50.0060.00316.16
7.4.40.0060.01022.77
7.4.30.0060.00916.52
7.4.00.0000.01414.73
7.3.330.0000.00613.41
7.3.320.0000.00513.46
7.3.310.0030.00316.37
7.3.300.0040.00416.41
7.3.290.0060.00916.31
7.3.280.0060.01016.34
7.3.270.0100.00717.40
7.3.260.0120.01316.60
7.3.250.0090.01016.40
7.3.240.0120.00616.39
7.3.230.0130.00716.46
7.3.210.0120.00616.50
7.3.200.0170.00619.39
7.3.190.0060.01516.39
7.3.180.0070.01016.54
7.3.170.0090.00616.34
7.3.160.0120.00916.37
7.3.120.0070.00414.81
7.2.330.0120.00616.62
7.2.320.0040.01316.64
7.2.310.0070.01016.81
7.2.300.0120.00616.63
7.2.290.0100.00616.84
7.2.60.0090.00616.77
7.2.00.0030.01319.59
7.1.200.0060.00615.64
7.1.100.0050.00518.30
7.1.70.0070.00317.02
7.1.60.0060.01919.82
7.1.50.0100.01016.97
7.1.00.0000.08022.35
7.0.200.0090.00016.82
7.0.140.0000.07722.15
7.0.60.0270.06019.96
7.0.50.0030.05317.91
7.0.40.0030.05020.13
7.0.30.0400.06720.20
7.0.20.0370.04020.12
7.0.10.0270.08020.07
7.0.00.0070.04720.18
5.6.280.0030.07321.08
5.6.210.0070.08020.55
5.6.200.0130.07018.27
5.6.190.0000.07720.46
5.6.180.4070.04720.33
5.6.170.0270.07320.52
5.6.160.0000.04320.54
5.6.150.0030.05318.18
5.6.140.0000.04018.11
5.6.130.0000.04318.14
5.6.120.0130.07320.88
5.6.110.0100.07721.14
5.6.100.0200.07321.09
5.6.90.0070.06020.98
5.6.80.0100.07720.41
5.6.70.0370.06320.54
5.5.350.0000.08720.39
5.5.340.0070.07017.95
5.5.330.0030.08020.41
5.5.320.0270.07720.31
5.5.310.0230.05320.30
5.5.300.0030.04017.96
5.5.290.0000.04317.98
5.5.280.0030.09020.80
5.5.270.0100.08020.86
5.5.260.0100.07020.84
5.5.250.0000.04720.45
5.5.240.0070.07720.15
5.4.450.0600.05719.61
5.4.440.0630.05719.60
5.4.430.0070.06019.36
5.4.420.0130.05319.46
5.4.410.0000.07719.26
5.4.400.1630.00018.74
5.4.390.1600.00018.61
5.4.380.0370.04318.53
5.4.370.0370.04718.63
5.4.360.0300.05318.81
5.4.350.0370.06018.70
5.4.340.0230.05718.78
5.4.320.0080.04412.50
5.4.310.0050.04212.50
5.4.300.0070.04212.51
5.4.290.0070.03712.50
5.4.280.0060.03812.40
5.4.270.0100.04312.40
5.4.260.0200.06318.87
5.4.250.0170.05318.64
5.4.240.0070.08018.71
5.4.230.0030.06018.96
5.4.220.0070.05718.95
5.4.210.0170.04718.91
5.4.200.0070.05718.92
5.4.190.0070.08018.75
5.4.180.0130.07318.87
5.4.170.0130.05018.61
5.4.160.0170.05018.60
5.4.150.0100.06018.70
5.4.140.0100.05016.37
5.4.130.0130.04316.43
5.4.120.0070.07316.41
5.4.110.0130.04316.61
5.4.100.0070.05016.46
5.4.90.0070.04716.54
5.4.80.0130.04316.33
5.4.70.0200.05716.45
5.4.60.0070.05316.45
5.4.50.0070.07016.41
5.4.40.0000.06016.54
5.4.30.0130.04716.58
5.4.20.0070.06016.42
5.4.10.0200.04316.48
5.4.00.0070.06715.98
5.3.290.0080.04512.80
5.3.280.0030.05714.66
5.3.270.0130.05314.78
5.3.260.0070.05314.78
5.3.250.0030.08014.68
5.3.240.0130.04314.73
5.3.230.0230.05314.66
5.3.220.0170.05714.39
5.3.210.0100.05014.56
5.3.200.0100.05314.63
5.3.190.0100.06314.67
5.3.180.0130.07314.64
5.3.170.0030.08014.64
5.3.160.0100.04314.55
5.3.150.0030.05314.57
5.3.140.0100.07714.57
5.3.130.0130.06314.63
5.3.120.0030.08014.40
5.3.110.0000.06014.53
5.3.100.0130.05314.26
5.3.90.0030.07314.10
5.3.80.0100.04714.00
5.3.70.0030.05714.01
5.3.60.0070.05013.97
5.3.50.0130.06713.77
5.3.40.0130.04313.91
5.3.30.0030.05014.09
5.3.20.0070.05013.68
5.3.10.0070.07013.55
5.3.00.0100.06013.72
5.2.170.0130.05311.23
5.2.160.0000.04711.36
5.2.150.0070.04711.23
5.2.140.0070.06011.12
5.2.130.0070.05311.07
5.2.120.0100.03711.18
5.2.110.0070.05311.17
5.2.100.0100.03311.18
5.2.90.0070.05311.16
5.2.80.0030.04311.00
5.2.70.0100.04011.09
5.2.60.0000.06710.96
5.2.50.0000.05011.20
5.2.40.0000.04310.99
5.2.30.0000.04311.04
5.2.20.0030.04710.96
5.2.10.0070.05310.95
5.2.00.0030.04310.71
5.1.60.0070.04310.09
5.1.50.0030.03310.03
5.1.40.0070.04710.07
5.1.30.0030.05310.51
5.1.20.0030.03710.34
5.1.10.0000.04010.11
5.1.00.0130.04310.31
5.0.50.0000.0338.55
5.0.40.0100.0278.26
5.0.30.0070.0508.38
5.0.20.0100.0278.30
5.0.10.0130.0308.16
5.0.00.0030.0438.09
4.4.90.0130.0137.04
4.4.80.0030.0207.04
4.4.70.0070.0277.04
4.4.60.0030.0207.04
4.4.50.0100.0177.04
4.4.40.0070.0307.04
4.4.30.0030.0207.04
4.4.20.0000.0307.04
4.4.10.0070.0207.04
4.4.00.0100.0407.04
4.3.110.0070.0277.04
4.3.100.0030.0307.04
4.3.90.0100.0207.04
4.3.80.0030.0337.04
4.3.70.0000.0237.04
4.3.60.0000.0307.04
4.3.50.0000.0237.04
4.3.40.0000.0437.04
4.3.30.0030.0207.04
4.3.20.0000.0237.04
4.3.10.0000.0237.04
4.3.00.0100.0207.27

preferences:
38.02 ms | 401 KiB | 5 Q