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) { if((str_replace($data[$j],"",$current))!=$current) { $data[$j]=""; }; } } } print_r($data); ?>

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.70.0100.01018.69
8.3.60.0040.01516.50
8.3.50.0110.00821.84
8.3.40.0150.00018.67
8.3.30.0030.01019.06
8.3.20.0040.00420.21
8.3.10.0030.00521.96
8.3.00.0140.00422.57
8.2.190.0120.00318.41
8.2.180.0120.00316.50
8.2.170.0070.01122.96
8.2.160.0160.00320.95
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.23
8.2.110.0090.00022.30
8.2.100.0040.00717.72
8.2.90.0030.00519.22
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0080.00417.80
8.2.50.0060.00318.07
8.2.40.0030.00719.94
8.2.30.0130.00018.15
8.2.20.0030.00617.63
8.2.10.0080.00019.53
8.2.00.0040.00417.80
8.1.280.0070.00725.92
8.1.270.0040.00422.07
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00323.88
8.1.230.0040.00719.15
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0070.00317.35
8.1.190.0030.00517.53
8.1.180.0000.00818.71
8.1.170.0000.00818.65
8.1.160.0070.00022.14
8.1.150.0000.00718.64
8.1.140.0030.00517.39
8.1.130.0030.00317.72
8.1.120.0000.00717.32
8.1.110.0050.00317.44
8.1.100.0040.00317.46
8.1.90.0070.00017.45
8.1.80.0040.00317.53
8.1.70.0000.00717.47
8.1.60.0080.00017.47
8.1.50.0000.00717.54
8.1.40.0050.00217.52
8.1.30.0000.00817.61
8.1.20.0000.00717.66
8.1.10.0030.00517.42
8.1.00.0030.00617.39
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0000.00718.37
8.0.270.0040.00417.16
8.0.260.0000.00616.72
8.0.250.0070.00016.98
8.0.240.0000.00816.81
8.0.230.0000.00716.84
8.0.220.0030.00316.96
8.0.210.0000.00716.89
8.0.200.0030.00316.78
8.0.190.0000.00716.77
8.0.180.0030.00316.78
8.0.170.0000.00816.93
8.0.160.0040.00416.83
8.0.150.0070.00016.87
8.0.140.0040.00416.83
8.0.130.0000.00513.34
8.0.120.0050.00316.89
8.0.110.0000.00716.89
8.0.100.0000.00816.89
8.0.90.0020.00516.89
8.0.80.0060.00916.88
8.0.70.0000.00716.77
8.0.60.0040.00416.77
8.0.50.0040.00416.76
8.0.30.0090.00917.20
8.0.20.0130.00717.40
8.0.10.0070.00017.06
8.0.00.0100.00916.74
7.4.330.0000.00515.03
7.4.320.0070.00016.61
7.4.300.0000.00616.47
7.4.290.0030.00316.62
7.4.280.0030.00316.64
7.4.270.0000.00616.53
7.4.260.0000.00716.48
7.4.250.0030.00316.61
7.4.240.0030.00316.47
7.4.230.0030.00316.70
7.4.220.0030.01416.53
7.4.210.0050.01216.57
7.4.200.0030.00316.54
7.4.190.0070.00016.66
7.4.160.0140.00316.47
7.4.150.0100.00717.40
7.4.140.0120.00517.86
7.4.130.0080.00916.48
7.4.120.0060.01216.59
7.4.110.0100.01316.35
7.4.100.0100.01016.36
7.4.90.0120.00616.69
7.4.80.0090.00819.39
7.4.70.0110.01116.53
7.4.60.0130.00316.54
7.4.50.0030.00316.33
7.4.40.0070.01022.77
7.4.30.0060.00916.35
7.4.00.0040.01514.80
7.3.330.0050.00013.15
7.3.320.0000.00613.37
7.3.310.0040.00416.35
7.3.300.0000.00716.24
7.3.290.0110.00416.37
7.3.280.0080.01016.36
7.3.270.0130.00317.40
7.3.260.0180.00316.51
7.3.250.0160.00216.52
7.3.240.0120.00916.44
7.3.230.0110.02116.47
7.3.210.0070.01016.20
7.3.200.0030.01319.39
7.3.190.0150.00916.48
7.3.180.0030.01316.65
7.3.170.0090.00616.39
7.3.160.0030.01316.38
7.3.120.0040.01114.83
7.2.330.0040.01516.68
7.2.320.0060.01016.79
7.2.310.0100.00716.79
7.2.300.0110.00616.66
7.2.290.0030.01316.77
7.2.60.0030.00717.12
7.2.50.0200.00417.05
7.1.200.0100.00315.57
7.1.70.0050.00217.18
7.1.60.0070.00317.02
7.1.50.0130.00616.93
7.1.00.0200.05722.30
7.0.200.0070.00716.88
7.0.140.0030.07021.99
7.0.60.0170.06719.85
7.0.50.0100.07317.86
7.0.40.0130.08320.41
7.0.30.0330.05720.08
7.0.20.0270.04320.19
7.0.10.0230.06320.07
7.0.00.0130.04320.19
5.6.280.0030.07320.86
5.6.210.0100.04320.65
5.6.200.0070.08018.16
5.6.190.0070.08320.63
5.6.180.4070.04320.61
5.6.170.0270.07320.62
5.6.160.0070.04720.50
5.6.150.0130.07318.18
5.6.140.0000.05318.19
5.6.130.0030.04018.23
5.6.120.0100.07720.97
5.6.110.0170.07321.04
5.6.100.0030.08320.97
5.6.90.0130.07721.04
5.6.80.0030.08020.59
5.6.70.0330.05720.41
5.5.350.0030.08020.42
5.5.340.0030.08017.98
5.5.330.0100.08020.41
5.5.320.0300.03320.36
5.5.310.0300.08020.30
5.5.300.0100.04718.09
5.5.290.0070.03717.95
5.5.280.0030.08020.77
5.5.270.0030.04720.85
5.5.260.0200.07320.76
5.5.250.0000.05320.80
5.5.240.0030.06020.16
5.4.450.0570.05719.17
5.4.440.0530.05719.16
5.4.430.0170.06719.52
5.4.420.0070.06019.39
5.4.410.0100.07719.41
5.4.400.1230.00018.82
5.4.390.0800.00018.44
5.4.380.0200.05718.78
5.4.370.0330.04718.78
5.4.360.0270.05318.82
5.4.350.0500.05018.73
5.4.340.0230.05718.59
5.4.320.0090.04012.51
5.4.310.0040.04212.50
5.4.300.0080.03912.50
5.4.290.0070.03812.50
5.4.280.0050.03612.40
5.4.270.0100.05012.40
5.4.260.0070.07718.62
5.4.250.0100.05318.78
5.4.240.0130.04718.95
5.4.230.0130.04718.82
5.4.220.0130.05318.73
5.4.210.0100.05318.96
5.4.200.0170.05318.59
5.4.190.0030.06018.96
5.4.180.0100.05718.80
5.4.170.0100.05718.71
5.4.160.0070.05318.91
5.4.150.0130.05018.91
5.4.140.0000.06016.38
5.4.130.0100.04716.38
5.4.120.0070.05316.45
5.4.110.0100.05016.52
5.4.100.0070.05016.38
5.4.90.0100.04716.53
5.4.80.0030.05016.60
5.4.70.0030.06716.28
5.4.60.0130.07016.35
5.4.50.0070.04716.45
5.4.40.0130.04716.43
5.4.30.0000.05316.43
5.4.20.0170.06316.58
5.4.10.0130.05316.43
5.4.00.0130.04716.08
5.3.290.0070.04612.80
5.3.280.0100.05014.42
5.3.270.0100.06014.51
5.3.260.0000.08714.69
5.3.250.0070.05314.61
5.3.240.0170.06014.43
5.3.230.0070.05014.60
5.3.220.0070.06314.66
5.3.210.0070.05314.75
5.3.200.0070.05014.39
5.3.190.0100.05014.70
5.3.180.0030.05714.78
5.3.170.0070.07714.64
5.3.160.0070.07014.64
5.3.150.0130.04314.64
5.3.140.0100.05014.46
5.3.130.0100.07314.61
5.3.120.0130.06714.62
5.3.110.0070.05314.56
5.3.100.0100.06013.87
5.3.90.0070.07313.99
5.3.80.0030.05714.11
5.3.70.0100.07014.20
5.3.60.0030.07014.07
5.3.50.0130.05313.85
5.3.40.0100.07314.04
5.3.30.0100.04713.81
5.3.20.0100.05313.71
5.3.10.0130.05013.72
5.3.00.0100.04713.73
5.2.170.0200.04011.32
5.2.160.0030.04311.13
5.2.150.0030.04711.18
5.2.140.0000.04711.21
5.2.130.0000.06011.18
5.2.120.0030.04311.17
5.2.110.0100.03311.07
5.2.100.0000.04711.19
5.2.90.0100.03711.18
5.2.80.0030.04310.92
5.2.70.0070.06011.16
5.2.60.0000.04711.14
5.2.50.0070.06011.20
5.2.40.0030.04311.22
5.2.30.0000.05310.98
5.2.20.0070.04010.94
5.2.10.0000.04710.95
5.2.00.0070.04010.55
5.1.60.0100.04710.23
5.1.50.0130.03710.19
5.1.40.0070.04710.01
5.1.30.0000.06010.28
5.1.20.0100.03310.53
5.1.10.0070.04710.04
5.1.00.0070.03710.13
5.0.50.0070.0308.71
5.0.40.0000.0308.34
5.0.30.0130.0338.32
5.0.20.0070.0338.26
5.0.10.0070.0238.19
5.0.00.0030.0438.41
4.4.90.0070.0207.04
4.4.80.0000.0337.04
4.4.70.0030.0207.04
4.4.60.0100.0207.04
4.4.50.0100.0237.04
4.4.40.0030.0477.04
4.4.30.0000.0337.04
4.4.20.0030.0337.04
4.4.10.0000.0237.04
4.4.00.0070.0407.04
4.3.110.0000.0307.04
4.3.100.0000.0337.04
4.3.90.0070.0277.04
4.3.80.0030.0337.04
4.3.70.0100.0137.04
4.3.60.0000.0307.04
4.3.50.0030.0207.04
4.3.40.0030.0307.04
4.3.30.0000.0337.04
4.3.20.0000.0337.04
4.3.10.0000.0237.04
4.3.00.0200.0177.27

preferences:
41.39 ms | 401 KiB | 5 Q