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.0140.00316.50
8.3.50.0200.00222.11
8.3.40.0030.01318.84
8.3.30.0070.00719.22
8.3.20.0080.00020.29
8.3.10.0000.00822.09
8.3.00.0110.00722.52
8.2.180.0040.01116.38
8.2.170.0110.00422.96
8.2.160.0000.01521.03
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0080.00017.50
8.2.110.0030.00622.15
8.2.100.0060.00619.63
8.2.90.0030.00618.95
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0000.00818.04
8.2.50.0050.00318.07
8.2.40.0000.00718.34
8.2.30.0030.00718.10
8.2.20.0020.00717.71
8.2.10.0040.00419.63
8.2.00.0000.00717.73
8.1.280.0140.00025.92
8.1.270.0080.00021.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0000.01319.10
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0100.00017.48
8.1.190.0000.00717.63
8.1.180.0060.00318.82
8.1.170.0040.00418.72
8.1.160.0040.00422.18
8.1.150.0000.00718.59
8.1.140.0040.00417.44
8.1.130.0000.00717.78
8.1.120.0000.00717.43
8.1.110.0040.00717.47
8.1.100.0040.00417.39
8.1.90.0030.00317.38
8.1.80.0070.00017.35
8.1.70.0000.00717.45
8.1.60.0030.00617.57
8.1.50.0070.00017.39
8.1.40.0000.00817.47
8.1.30.0040.00417.45
8.1.20.0000.00817.54
8.1.10.0050.00317.47
8.1.00.0000.00817.47
8.0.300.0070.00018.77
8.0.290.0070.00017.15
8.0.280.0000.00718.40
8.0.270.0070.00017.26
8.0.260.0000.00616.88
8.0.250.0030.00316.91
8.0.240.0000.00816.90
8.0.230.0070.00016.96
8.0.220.0070.00016.97
8.0.210.0000.00716.88
8.0.200.0000.00716.84
8.0.190.0040.00416.96
8.0.180.0030.00316.95
8.0.170.0000.00716.88
8.0.160.0040.00416.94
8.0.150.0030.00316.95
8.0.140.0000.00816.79
8.0.130.0050.00013.36
8.0.120.0000.00916.89
8.0.110.0020.00516.80
8.0.100.0000.00716.80
8.0.90.0000.00716.74
8.0.80.0040.01116.85
8.0.70.0020.00516.91
8.0.60.0040.00416.90
8.0.50.0040.00416.69
8.0.30.0120.00817.17
8.0.20.0110.00817.40
8.0.10.0070.00017.01
8.0.00.0090.01216.83
7.4.330.0050.00015.07
7.4.320.0000.00616.61
7.4.300.0000.00616.57
7.4.290.0000.00716.63
7.4.280.0030.00316.40
7.4.270.0030.00316.42
7.4.260.0030.00316.64
7.4.250.0030.00516.46
7.4.240.0010.00616.52
7.4.230.0000.00716.68
7.4.220.0080.00916.56
7.4.210.0100.00516.56
7.4.200.0030.00516.51
7.4.190.0080.00016.77
7.4.160.0100.00616.34
7.4.150.0130.00717.40
7.4.140.0180.00217.86
7.4.130.0080.01016.39
7.4.120.0060.01116.48
7.4.110.0030.01416.50
7.4.100.0030.01716.64
7.4.90.0040.01316.46
7.4.80.0030.01419.39
7.4.70.0180.00416.75
7.4.60.0100.00616.48
7.4.50.0040.00016.61
7.4.40.0110.00422.77
7.4.30.0130.00316.60
7.4.00.0000.01414.93
7.3.330.0000.00613.19
7.3.320.0050.00013.44
7.3.310.0000.00716.41
7.3.300.0050.00216.43
7.3.290.0030.01016.38
7.3.280.0050.01016.35
7.3.270.0030.01317.40
7.3.260.0200.00316.68
7.3.250.0120.00616.53
7.3.240.0110.00716.33
7.3.230.0080.01116.39
7.3.210.0070.01116.28
7.3.200.0030.01619.39
7.3.190.0140.00316.31
7.3.180.0080.00816.49
7.3.170.0060.00916.30
7.3.160.0130.00616.61
7.3.120.0090.00914.79
7.3.110.0070.01114.69
7.3.100.0040.01115.09
7.3.90.0000.01814.55
7.3.80.0080.00014.79
7.3.70.0060.01014.62
7.3.60.0050.00514.76
7.3.50.0060.00914.72
7.3.40.0100.00314.75
7.3.30.0090.00615.00
7.3.20.0040.00816.50
7.3.10.0070.00616.57
7.3.00.0050.00716.64
7.2.330.0070.01116.62
7.2.320.0060.01016.66
7.2.310.0120.00616.76
7.2.300.0030.01316.60
7.2.290.0040.01216.72
7.2.240.0030.01415.06
7.2.230.0070.00415.04
7.2.220.0060.00314.65
7.2.210.0040.00814.84
7.2.200.0000.01114.96
7.2.190.0040.01114.99
7.2.180.0090.00615.24
7.2.170.0080.00815.10
7.2.160.0030.01015.04
7.2.150.0040.00716.81
7.2.140.0040.01216.92
7.2.130.0020.01016.74
7.2.120.0040.01016.83
7.2.110.0050.00716.57
7.2.100.0060.01016.64
7.2.90.0100.00616.97
7.2.80.0070.00616.81
7.2.70.0050.01017.02
7.2.60.0060.00816.67
7.2.50.0070.00716.82
7.2.40.0070.00516.98
7.2.30.0080.00816.98
7.2.20.0130.00416.66
7.2.10.0100.00816.70
7.2.00.0060.01117.45
7.1.330.0080.00815.95
7.1.320.0120.00315.86
7.1.310.0030.00915.59
7.1.300.0080.00415.84
7.1.290.0060.00615.67
7.1.280.0030.01415.52
7.1.270.0080.00615.86
7.1.260.0080.00415.96
7.1.250.0020.00815.70
7.1.200.0120.00615.73
7.1.100.0030.01018.20
7.1.70.0000.00917.11
7.1.60.0100.01319.82
7.1.50.0130.00616.78
7.1.00.0130.06322.52
7.0.200.0000.00816.64
7.0.140.0070.07021.97
7.0.60.0070.06719.87
7.0.50.0130.08317.88
7.0.40.0100.07320.05
7.0.30.0330.08020.16
7.0.20.0270.04320.30
7.0.10.0070.08720.06
7.0.00.0030.04020.05
5.6.280.0030.07321.13
5.6.210.0170.07720.57
5.6.200.0070.06318.20
5.6.190.0070.03720.42
5.6.180.0300.04020.52
5.6.170.0270.03020.51
5.6.160.0000.05020.49
5.6.150.0100.07318.23
5.6.140.0070.05018.25
5.6.130.0130.06318.27
5.6.120.0070.04320.93
5.6.110.0170.07021.00
5.6.100.0030.05321.09
5.6.90.0170.07720.96
5.6.80.0100.06020.41
5.5.350.0300.07720.52
5.5.340.0030.05018.00
5.5.330.0000.04320.47
5.5.320.0400.05320.25
5.5.310.0330.03720.34
5.5.300.0030.05717.95
5.5.290.0030.07017.92
5.5.280.0130.04720.80
5.5.270.0170.07720.86
5.5.260.0100.07720.88
5.5.250.0100.04320.57
5.5.240.4100.04320.27
5.4.450.0670.05019.39
5.4.440.0430.03719.40
5.4.430.0670.03319.52
5.4.420.0930.03719.64
5.4.410.0670.04719.29
5.4.400.0670.04719.23
5.4.390.0400.04018.84
5.4.380.0300.05318.59
5.4.370.0330.05718.59
5.4.360.0430.04318.57
5.4.350.0670.05318.61
5.4.340.0230.06718.73
5.4.320.0080.03812.50
5.4.310.0060.03812.50
5.4.300.0070.03512.50
5.4.290.0050.04112.50
5.4.280.0060.03712.40
5.4.270.0060.04812.39
5.4.260.0100.07018.95
5.4.250.0170.04318.91
5.4.240.0070.05318.71
5.4.230.0170.04718.93
5.4.220.0100.05318.64
5.4.210.0030.05718.80
5.4.200.0030.08318.97
5.4.190.0170.05019.06
5.4.180.0170.05018.92
5.4.170.0030.05718.86
5.4.160.0100.05718.85
5.4.150.0070.07018.97
5.4.140.0130.05316.34
5.4.130.0200.06016.37
5.4.120.0030.05716.29
5.4.110.0030.05316.36
5.4.100.0000.07016.45
5.4.90.0070.04716.52
5.4.80.0100.05316.42
5.4.70.0030.05316.47
5.4.60.0100.06716.30
5.4.50.0070.05016.61
5.4.40.0130.06016.61
5.4.30.0030.07716.34
5.4.20.0100.04316.34
5.4.10.0070.05016.35
5.4.00.0030.06716.03
5.3.290.0060.04012.80
5.3.280.0000.05714.56
5.3.270.0130.07014.68
5.3.260.0130.04714.77
5.3.250.0130.04714.69
5.3.240.0100.07014.61
5.3.230.0100.05314.58
5.3.220.0070.05014.65
5.3.210.0130.05314.55
5.3.200.0070.05314.74
5.3.190.0070.06314.65
5.3.180.0030.05314.63
5.3.170.0070.05014.55
5.3.160.0200.06014.70
5.3.150.0070.05014.70
5.3.140.0100.04714.64
5.3.130.0170.05314.78
5.3.120.0070.05314.51
5.3.110.0030.05314.77
5.3.100.0100.05314.04
5.3.90.0100.05014.08
5.3.80.0070.05014.18
5.3.70.0030.05714.04
5.3.60.0000.06714.09
5.3.50.0070.04714.11
5.3.40.0170.04714.11
5.3.30.0100.06713.97
5.3.20.0100.04713.78
5.3.10.0030.05013.48
5.3.00.0130.06013.71
5.2.170.0000.04711.20
5.2.160.0030.06311.22
5.2.150.0000.05311.10
5.2.140.0030.04311.14
5.2.130.0030.04011.09
5.2.120.0130.03311.27
5.2.110.0030.04011.18
5.2.100.0100.05711.17
5.2.90.0030.04011.32
5.2.80.0070.04311.16
5.2.70.0070.04711.27
5.2.60.0100.05011.21
5.2.50.0030.05711.09
5.2.40.0100.03710.84
5.2.30.0070.04710.88
5.2.20.0100.05010.91
5.2.10.0030.04310.84
5.2.00.0030.04310.80
5.1.60.0070.03310.14
5.1.50.0030.03310.19
5.1.40.0000.0379.98
5.1.30.0100.03010.42
5.1.20.0030.03710.43
5.1.10.0030.04010.07
5.1.00.0030.0539.91
5.0.50.0030.0308.60
5.0.40.0030.0278.51
5.0.30.0030.0408.38
5.0.20.0070.0308.44
5.0.10.0100.0238.19
5.0.00.0070.0408.32
4.4.90.0070.0177.04
4.4.80.0000.0237.04
4.4.70.0030.0307.04
4.4.60.0030.0277.04
4.4.50.0030.0277.04
4.4.40.0070.0307.04
4.4.30.0070.0177.04
4.4.20.0030.0207.04
4.4.10.0000.0337.04
4.4.00.0070.0337.04
4.3.110.0000.0237.04
4.3.100.0070.0277.04
4.3.90.0070.0207.04
4.3.80.0000.0337.04
4.3.70.0070.0177.04
4.3.60.0000.0237.04
4.3.50.0070.0177.04
4.3.40.0000.0337.04
4.3.30.0000.0207.04
4.3.20.0030.0207.04
4.3.10.0000.0237.04
4.3.00.0070.01714.49

preferences:
54.22 ms | 400 KiB | 5 Q