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."\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.01418.29
8.3.50.0080.00821.99
8.3.40.0140.00018.79
8.3.30.0140.00419.21
8.3.20.0050.00220.30
8.3.10.0030.00622.00
8.3.00.0040.01122.58
8.2.180.0160.00316.63
8.2.170.0070.00722.96
8.2.160.0090.00621.07
8.2.150.0040.00424.18
8.2.140.0180.00024.66
8.2.130.0000.00926.16
8.2.120.0080.00019.23
8.2.110.0030.00622.09
8.2.100.0060.00619.76
8.2.90.0030.00519.35
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0060.00318.28
8.2.30.0080.00018.19
8.2.20.0040.00417.74
8.2.10.0040.00419.60
8.2.00.0040.00417.75
8.1.280.0130.00725.92
8.1.270.0060.00322.09
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0070.00321.06
8.1.230.0080.00417.42
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.51
8.1.180.0000.00918.79
8.1.170.0040.00418.59
8.1.160.0040.00422.01
8.1.150.0000.00718.54
8.1.140.0040.00417.44
8.1.130.0080.00017.89
8.1.120.0070.00017.41
8.1.110.0060.00317.46
8.1.100.0050.00217.48
8.1.90.0000.00717.38
8.1.80.0080.00017.51
8.1.70.0000.00717.44
8.1.60.0040.00417.46
8.1.50.0030.00517.47
8.1.40.0060.00317.39
8.1.30.0000.00817.63
8.1.20.0040.00417.57
8.1.10.0000.00817.47
8.1.00.0000.00817.47
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.36
8.0.270.0000.00716.89
8.0.260.0030.00316.80
8.0.250.0000.00717.08
8.0.240.0020.00517.02
8.0.230.0000.00716.92
8.0.220.0030.00316.85
8.0.210.0070.00016.96
8.0.200.0000.00716.96
8.0.190.0030.00516.85
8.0.180.0000.00716.93
8.0.170.0040.00416.89
8.0.160.0040.00416.73
8.0.150.0000.01016.79
8.0.140.0000.00716.93
8.0.130.0060.00013.23
8.0.120.0080.00016.70
8.0.110.0030.00516.88
8.0.100.0070.00016.83
8.0.90.0040.00416.89
8.0.80.0090.00616.89
8.0.70.0040.00416.85
8.0.60.0000.00716.79
8.0.50.0040.00417.01
8.0.30.0100.01017.14
8.0.20.0080.01117.40
8.0.10.0040.00417.01
8.0.00.0130.00416.88
7.4.330.0050.00015.14
7.4.320.0060.00016.43
7.4.300.0060.00016.52
7.4.290.0030.00316.57
7.4.280.0040.00316.50
7.4.270.0000.00616.53
7.4.260.0070.00016.39
7.4.250.0040.00416.52
7.4.240.0040.00316.56
7.4.230.0070.00016.35
7.4.220.0090.00916.45
7.4.210.0030.01316.60
7.4.200.0050.00216.41
7.4.190.0070.00016.62
7.4.160.0080.00816.55
7.4.150.0080.00817.40
7.4.140.0090.00817.86
7.4.130.0120.00716.45
7.4.120.0100.00816.71
7.4.110.0150.00316.60
7.4.100.0140.00416.38
7.4.90.0070.01116.38
7.4.80.0100.01019.39
7.4.70.0090.01216.45
7.4.60.0100.00716.54
7.4.50.0040.00016.33
7.4.40.0060.00922.77
7.4.30.0120.00616.64
7.4.00.0030.01315.15
7.3.330.0030.00313.19
7.3.320.0050.00013.35
7.3.310.0070.00016.40
7.3.300.0070.00016.36
7.3.290.0040.01116.39
7.3.280.0100.00916.38
7.3.270.0050.01317.40
7.3.260.0130.01016.55
7.3.250.0090.00716.55
7.3.240.0030.01816.57
7.3.230.0100.01016.39
7.3.210.0120.00816.50
7.3.200.0060.01119.39
7.3.190.0110.00716.53
7.3.180.0140.00316.60
7.3.170.0140.00716.41
7.3.160.0000.01716.29
7.3.120.0110.00714.76
7.3.10.0110.00416.05
7.3.00.0080.00616.59
7.2.330.0030.01416.66
7.2.320.0100.00716.64
7.2.310.0100.01316.70
7.2.300.0130.00316.41
7.2.290.0090.00916.87
7.2.130.0050.00816.76
7.2.120.0100.00516.71
7.2.110.0080.00716.80
7.2.100.0030.01316.86
7.2.90.0030.01016.81
7.2.80.0110.00316.81
7.2.70.0070.00616.78
7.2.60.0060.00716.83
7.2.50.0070.00916.89
7.2.40.0090.00516.88
7.2.30.0100.00816.88
7.2.20.0050.01116.80
7.2.10.0100.00616.76
7.2.00.0100.00717.63
7.1.250.0040.00715.45
7.1.240.0060.00615.62
7.1.230.0000.00815.88
7.1.220.0100.01015.67
7.1.210.0100.00015.86
7.1.200.0100.00715.82
7.1.190.0060.00315.52
7.1.180.0170.00315.77
7.1.170.0040.01115.63
7.1.160.0100.00315.82
7.1.150.0000.01715.71
7.1.140.0000.00815.64
7.1.130.0100.00315.82
7.1.120.0030.01015.80
7.1.110.0060.00615.97
7.1.100.0050.00917.20
7.1.90.0030.00715.91
7.1.80.0030.01315.49
7.1.70.0050.00716.52
7.1.60.0110.00717.75
7.1.50.0060.00616.13
7.1.40.0000.01315.96
7.1.30.0100.00315.78
7.1.20.0030.01315.82
7.1.10.0110.00315.72
7.1.00.0000.04619.12
7.0.330.0130.00015.00
7.0.320.0040.00815.44
7.0.310.0070.00715.53
7.0.300.0000.00915.01
7.0.290.0030.00915.14
7.0.280.0090.00015.25
7.0.270.0030.01014.92
7.0.260.0090.00615.41
7.0.250.0000.01315.29
7.0.240.0030.01015.02
7.0.230.0100.00315.20
7.0.220.0040.01115.30
7.0.210.0090.00615.36
7.0.200.0050.00816.05
7.0.190.0120.00315.39
7.0.180.0030.01015.48
7.0.170.0030.01315.24
7.0.160.0050.00815.17
7.0.150.0000.00815.27
7.0.140.0060.03618.79
7.0.130.0110.00415.26
7.0.120.0030.00715.56
7.0.110.0040.01215.24
7.0.100.0200.03117.67
7.0.90.0170.04017.66
7.0.80.0030.04017.59
7.0.70.0070.04517.63
7.0.60.0080.04317.76
7.0.50.0080.04017.95
7.0.40.0050.02816.64
7.0.30.0070.03516.73
7.0.20.0080.04316.70
7.0.10.0120.02516.56
7.0.00.0100.04516.60
5.6.380.0100.00314.30
5.6.370.0060.00614.25
5.6.360.0110.00314.54
5.6.350.0070.00314.28
5.6.340.0060.00814.33
5.6.330.0130.00014.15
5.6.320.0080.00814.41
5.6.310.0000.00814.45
5.6.300.0040.00714.25
5.6.290.0030.01014.07
5.6.280.0050.04017.56
5.6.270.0000.01714.26
5.6.260.0060.00314.58
5.6.250.0100.04117.25
5.6.240.0050.02817.47
5.6.230.0100.04117.62
5.6.220.0090.02517.55
5.6.210.0070.04617.46
5.6.200.0050.04517.68
5.6.190.0030.04917.63
5.6.180.0120.04017.62
5.6.170.0070.04717.54
5.6.160.0080.04317.60
5.6.150.0120.04317.60
5.6.140.0000.05117.73
5.6.130.0080.04017.67
5.6.120.0100.03517.63
5.6.110.0050.03717.79
5.6.100.0090.02717.92
5.6.90.0080.02917.97
5.6.80.0050.02517.25
5.6.70.0070.04017.14
5.6.60.0100.04217.44
5.6.50.0130.03317.52
5.6.40.0070.02717.38
5.6.30.0100.03517.28
5.6.20.0080.03817.21
5.6.10.0050.02517.38
5.6.00.0110.04017.32
5.5.380.0080.04015.71
5.5.370.0050.02415.82
5.5.360.0030.03815.73
5.5.350.0050.04415.73
5.5.340.0050.04416.07
5.5.330.0100.03715.89
5.5.320.0030.03816.05
5.5.310.0030.04515.78
5.5.300.0120.04015.91
5.5.290.0100.03816.10
5.5.280.0050.03016.14
5.5.270.0040.04616.15
5.5.260.0050.02515.99
5.5.250.0040.04515.86
5.5.240.0030.04315.64
5.5.230.0050.03815.81
5.5.220.0080.04115.75
5.5.210.0100.02915.51
5.5.200.0070.03715.62
5.5.190.0100.03615.76
5.5.180.0100.03815.75
5.5.170.0030.00611.24
5.5.160.0070.04315.58
5.5.150.0060.03815.76
5.5.140.0060.02815.48
5.5.130.0040.02915.80
5.5.120.0050.03015.75
5.5.110.0100.03315.56
5.5.100.0080.02515.67
5.5.90.0060.03815.66
5.5.80.0030.04015.61
5.5.70.0080.04115.57
5.5.60.0050.02515.67
5.5.50.0050.04115.55
5.5.40.0040.02815.68
5.5.30.0070.02515.67
5.5.20.0050.02515.51
5.5.10.0070.03815.71
5.5.00.0050.04215.69
5.4.450.0070.02915.27
5.4.440.0050.04215.29
5.4.430.0040.03015.08
5.4.420.0100.04015.16
5.4.410.0100.03515.20
5.4.400.0050.03215.00
5.4.390.0030.02515.07
5.4.380.0080.03214.92
5.4.370.0070.02315.04
5.4.360.0050.03015.17
5.4.350.0030.04315.09
5.4.340.0100.03714.99
5.4.330.0060.00610.99
5.4.320.0050.04015.17
5.4.310.0090.03814.81
5.4.300.0070.03515.02
5.4.290.0090.03715.05
5.4.280.0070.03215.16
5.4.270.0090.04015.09
5.4.260.0120.03114.98
5.4.250.0070.04114.93
5.4.240.0060.02415.04
5.4.230.0060.03514.94
5.4.220.0050.04115.22
5.4.210.0020.03515.11
5.4.200.0030.04514.99
5.4.190.0100.02715.09
5.4.180.0050.04114.88
5.4.170.0070.04114.94
5.4.160.0080.04015.11
5.4.150.0070.03615.05
5.4.140.0080.04013.70
5.4.130.0060.03913.67
5.4.120.0110.03413.64
5.4.110.0090.03613.78
5.4.100.0030.02413.78
5.4.90.0030.02813.80
5.4.80.0070.02313.74
5.4.70.0030.02413.84
5.4.60.0070.02513.67
5.4.50.0080.03313.60
5.4.40.0070.04013.92
5.4.30.0070.03013.74
5.4.20.0050.03413.79
5.4.10.0120.03313.68
5.4.00.0020.02713.45
5.3.290.0060.03412.70
5.3.280.0050.02312.67
5.3.270.0050.04012.71
5.3.260.0060.04012.65
5.3.250.0050.04312.68
5.3.240.0070.03712.58
5.3.230.0040.03912.64
5.3.220.0070.02212.43
5.3.210.0050.04112.35
5.3.200.0030.04112.41
5.3.190.0080.03812.63
5.3.180.0060.04012.60
5.3.170.0080.03312.48
5.3.160.0020.04212.53
5.3.150.0090.03812.59
5.3.140.0030.03112.51
5.3.130.0040.04412.59
5.3.120.0080.03612.47
5.3.110.0070.04212.48
5.3.100.0080.03812.36
5.3.90.0050.04212.36
5.3.80.0100.03812.21
5.3.70.0070.02212.33
5.3.60.0070.03512.35
5.3.50.0020.04212.36
5.3.40.0000.03112.26
5.3.30.0020.04112.19
5.3.20.0060.02012.07
5.3.10.0040.03812.07
5.3.00.0050.03512.08
5.2.170.0020.02210.37
5.2.160.0060.02810.27
5.2.150.0050.03110.38
5.2.140.0020.03310.31
5.2.130.0080.01510.19
5.2.120.0110.02810.27
5.2.110.0020.03210.36
5.2.100.0060.02810.35
5.2.90.0080.03110.26
5.2.80.0050.03410.21
5.2.70.0020.02410.21
5.2.60.0020.02510.18
5.2.50.0040.03210.24
5.2.40.0050.03210.13
5.2.30.0030.02110.10
5.2.20.0090.01310.20
5.2.10.0030.03410.18
5.2.00.0050.0289.94
5.1.60.0040.0209.30
5.1.50.0020.0219.32
5.1.40.0010.0259.34
5.1.30.0060.0159.50
5.1.20.0050.0299.51
5.1.10.0020.0289.41
5.1.00.0040.0239.26
5.0.50.0030.0218.37
5.0.40.0060.0108.26
5.0.30.0040.0328.23
5.0.20.0070.0208.26
5.0.10.0030.0168.22
5.0.00.0030.0338.20
4.4.90.0020.0208.18
4.4.80.0030.0188.18
4.4.70.0020.0198.18
4.4.60.0030.0168.18
4.4.50.0020.0158.18
4.4.40.0020.0268.18
4.4.30.0030.0098.18
4.4.20.0030.0148.18
4.4.10.0000.0178.18
4.4.00.0020.0228.18
4.3.110.0060.0188.18
4.3.100.0020.0208.18
4.3.90.0020.0208.18
4.3.80.0020.0308.18
4.3.70.0000.0178.18
4.3.60.0050.0188.18
4.3.50.0050.0188.18
4.3.40.0030.0168.18
4.3.30.0020.0188.18
4.3.20.0000.0158.18
4.3.10.0000.0228.18
4.3.00.0040.0198.18

preferences:
39.69 ms | 401 KiB | 5 Q