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=(str_replace($data[$j],"",$current)); } } if ($current!="") { echo $current."\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.0070.01116.63
8.3.50.0130.00821.99
8.3.40.0150.00018.89
8.3.30.0070.01119.04
8.3.20.0080.00820.34
8.3.10.0000.00822.13
8.3.00.0080.00022.58
8.2.180.0090.00616.32
8.2.170.0150.00322.96
8.2.160.0110.00321.07
8.2.150.0040.00424.18
8.2.140.0090.00924.66
8.2.130.0060.00326.16
8.2.120.0080.00017.63
8.2.110.0080.00420.34
8.2.100.0000.01119.57
8.2.90.0000.00819.21
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0060.00318.05
8.2.50.0050.00318.07
8.2.40.0050.00518.10
8.2.30.0040.00418.02
8.2.20.0040.00417.77
8.2.10.0000.00819.53
8.2.00.0030.00617.60
8.1.280.0150.00425.92
8.1.270.0080.00022.19
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.78
8.1.230.0030.00719.10
8.1.220.0090.00017.79
8.1.210.0030.00618.77
8.1.200.0030.00717.48
8.1.190.0040.00417.43
8.1.180.0000.00718.74
8.1.170.0080.00018.50
8.1.160.0040.00422.12
8.1.150.0050.00218.63
8.1.140.0080.00017.48
8.1.130.0070.00017.69
8.1.120.0050.00317.48
8.1.110.0050.00317.47
8.1.100.0050.00217.36
8.1.90.0030.00317.33
8.1.80.0000.00817.45
8.1.70.0030.00317.46
8.1.60.0060.00317.55
8.1.50.0000.00717.46
8.1.40.0040.00417.41
8.1.30.0000.00817.57
8.1.20.0040.00417.62
8.1.10.0040.00417.51
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0070.00017.15
8.0.280.0080.00018.49
8.0.270.0070.00017.15
8.0.260.0060.00016.86
8.0.250.0000.00717.02
8.0.240.0000.00717.04
8.0.230.0000.00716.84
8.0.220.0000.00616.95
8.0.210.0070.00016.81
8.0.200.0030.00316.80
8.0.190.0070.00016.95
8.0.180.0030.00316.81
8.0.170.0070.00016.75
8.0.160.0050.00216.89
8.0.150.0070.00016.86
8.0.140.0080.00016.73
8.0.130.0000.00713.30
8.0.120.0000.00816.95
8.0.110.0000.00716.77
8.0.100.0040.00416.91
8.0.90.0040.00416.77
8.0.80.0000.01516.83
8.0.70.0080.00016.90
8.0.60.0000.00716.77
8.0.50.0040.00416.93
8.0.30.0110.00817.01
8.0.20.0070.01117.40
8.0.10.0050.00317.03
8.0.00.0140.00616.85
7.4.330.0030.00315.14
7.4.320.0030.00316.60
7.4.300.0000.00616.57
7.4.290.0030.00316.61
7.4.280.0000.00716.45
7.4.270.0030.00316.55
7.4.260.0040.00416.51
7.4.250.0000.00716.48
7.4.240.0030.00516.54
7.4.230.0040.00416.58
7.4.220.0130.00416.64
7.4.210.0090.00716.54
7.4.200.0000.00716.71
7.4.190.0000.00716.66
7.4.160.0060.00916.46
7.4.150.0110.01417.40
7.4.140.0120.00817.86
7.4.130.0140.00516.50
7.4.120.0120.00816.41
7.4.110.0110.00816.59
7.4.100.0110.01416.56
7.4.90.0170.00016.39
7.4.80.0120.00619.39
7.4.70.0030.01316.60
7.4.60.0120.00416.57
7.4.50.0040.00416.31
7.4.40.0060.00822.77
7.4.30.0130.00316.44
7.4.00.0070.01015.08
7.3.330.0030.00313.38
7.3.320.0030.00313.32
7.3.310.0000.00816.25
7.3.300.0000.00716.27
7.3.290.0120.00316.38
7.3.280.0070.00816.35
7.3.270.0120.00617.40
7.3.260.0150.00916.41
7.3.250.0060.01416.47
7.3.240.0110.00616.35
7.3.230.0180.01516.59
7.3.210.0060.01216.45
7.3.200.0110.00619.39
7.3.190.0060.01216.64
7.3.180.0080.01116.37
7.3.170.0060.00916.39
7.3.160.0170.00616.46
7.3.120.0060.00914.91
7.2.330.0100.01016.66
7.2.320.0070.01316.58
7.2.310.0090.00916.82
7.2.300.0060.01016.52
7.2.290.0130.00316.73
7.2.60.0030.01316.99
7.2.00.0070.00719.48
7.1.200.0050.00515.86
7.1.100.0000.00818.34
7.1.70.0000.01117.13
7.1.60.0140.01019.82
7.1.50.0120.00916.71
7.1.00.0000.08022.58
7.0.200.0050.00316.73
7.0.140.0030.07321.97
7.0.60.0100.07320.01
7.0.50.0100.03717.89
7.0.40.0070.06320.13
7.0.30.0270.07020.23
7.0.20.0270.03320.26
7.0.10.0070.09320.15
7.0.00.0000.05020.19
5.6.280.0030.07321.07
5.6.210.0070.07020.77
5.6.200.0030.08718.16
5.6.190.0130.08020.52
5.6.180.0370.03720.46
5.6.170.0330.06020.55
5.6.160.0030.06020.44
5.6.150.0130.05318.14
5.6.140.0000.04718.23
5.6.130.0070.08018.16
5.6.120.0000.06021.12
5.6.110.0030.04020.96
5.6.100.0100.08021.01
5.6.90.0030.08720.97
5.6.80.0070.05020.36
5.5.350.0230.02720.35
5.5.340.0030.05317.98
5.5.330.0170.03320.41
5.5.320.0070.07720.36
5.5.310.0270.05020.36
5.5.300.0030.06018.03
5.5.290.0070.03717.99
5.5.280.0130.05320.77
5.5.270.0070.07020.89
5.5.260.0070.08320.76
5.5.250.0100.08020.66
5.5.240.0100.07720.24
5.4.450.0670.05719.40
5.4.440.0170.05319.15
5.4.430.0130.05319.46
5.4.420.0130.05319.41
5.4.410.0230.04319.11
5.4.400.1430.00018.61
5.4.390.1770.00018.63
5.4.380.0200.06018.63
5.4.370.0370.04718.72
5.4.360.0370.04718.61
5.4.350.0300.05018.70
5.4.340.0200.06018.53
5.4.320.0080.04112.50
5.4.310.0070.04012.50
5.4.300.0030.04212.50
5.4.290.0100.03612.50
5.4.280.0070.03512.40
5.4.270.0080.03412.40
5.4.260.0170.04718.98
5.4.250.0100.06018.96
5.4.240.0070.05718.77
5.4.230.0200.07019.06
5.4.220.0070.05718.91
5.4.210.0070.06018.62
5.4.200.0130.07018.93
5.4.190.0100.05018.95
5.4.180.0000.07718.80
5.4.170.0130.05018.95
5.4.160.0330.04318.79
5.4.150.0070.06018.89
5.4.140.0070.05716.30
5.4.130.0100.05716.35
5.4.120.0130.04716.34
5.4.110.0100.05016.45
5.4.100.0070.05316.43
5.4.90.0100.04316.37
5.4.80.0070.07016.38
5.4.70.0070.05016.31
5.4.60.0130.06316.45
5.4.50.0070.05016.48
5.4.40.0030.06016.41
5.4.30.0170.04316.34
5.4.20.0200.03716.49
5.4.10.0100.06016.32
5.4.00.0070.05316.00
5.3.290.0040.04412.80
5.3.280.0070.05014.57
5.3.270.0100.06014.73
5.3.260.0070.05714.67
5.3.250.0200.06014.82
5.3.240.0100.05314.65
5.3.230.0070.05314.58
5.3.220.0070.07314.64
5.3.210.0070.07714.70
5.3.200.0070.05014.58
5.3.190.0100.05714.63
5.3.180.0130.05714.64
5.3.170.0100.07014.65
5.3.160.0030.07714.39
5.3.150.0100.05014.64
5.3.140.0070.07714.54
5.3.130.0130.06014.63
5.3.120.0070.05314.62
5.3.110.0070.06014.63
5.3.100.0200.03714.22
5.3.90.0100.04713.84
5.3.80.0030.05314.00
5.3.70.0170.04714.11
5.3.60.0000.06314.07
5.3.50.0030.05714.11
5.3.40.0070.07013.78
5.3.30.0100.05313.88
5.3.20.0170.06013.78
5.3.10.0100.05313.65
5.3.00.0100.06313.86
5.2.170.0000.06711.30
5.2.160.0100.05311.20
5.2.150.0030.06711.21
5.2.140.0030.05311.22
5.2.130.0000.06011.32
5.2.120.0030.05311.27
5.2.110.0000.05011.08
5.2.100.0100.04311.09
5.2.90.0070.05711.00
5.2.80.0130.04011.04
5.2.70.0000.06311.09
5.2.60.0100.04311.12
5.2.50.0030.05011.25
5.2.40.0030.05310.97
5.2.30.0070.04311.15
5.2.20.0070.03711.04
5.2.10.0030.04710.83
5.2.00.0100.04710.80
5.1.60.0070.0439.97
5.1.50.0070.0439.97
5.1.40.0000.04310.21
5.1.30.0030.05010.28
5.1.20.0030.04010.44
5.1.10.0030.04010.11
5.1.00.0100.04710.07
5.0.50.0070.0278.65
5.0.40.0030.0278.26
5.0.30.0070.0578.43
5.0.20.0000.0338.36
5.0.10.0030.0338.25
5.0.00.0000.0478.23
4.4.90.0070.0236.30
4.4.80.0030.0336.20
4.4.70.0070.0236.11
4.4.60.0030.0236.11
4.4.50.0030.0275.94
4.4.40.0070.0375.87
4.4.30.0030.0305.88
4.4.20.0000.0305.90
4.4.10.0030.0207.01
4.4.00.0030.0477.01
4.3.110.0000.0237.01
4.3.100.0000.0337.01
4.3.90.0000.0237.01
4.3.80.0030.0337.01
4.3.70.0070.0207.01
4.3.60.0100.0137.01
4.3.50.0000.0237.01
4.3.40.0030.0307.01
4.3.30.0030.0207.01
4.3.20.0030.0207.01
4.3.10.0000.0237.01
4.3.00.0130.0177.08

preferences:
39.16 ms | 401 KiB | 5 Q