3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aryParam = array(); $userid="sondang"; $ipaddress="10.0.0.1"; $type="OK"; $action="mkdir"; $aryParam[] = $userid; $aryParam[] = $ipaddress; $aryParam[] = $type; $aryParam[] = $action; $path = "startia/abc/test.txt"; //ObjName $objname = $path; $len = mb_strlen($path); if($len > 0 && mb_substr($objname, 0, 2) == '//'){ $objname = mb_substr($objname, 2); } if($len > 0 && mb_substr($objname, 0, 1) == '/'){ $objname = mb_substr($objname, 1); } $objname = "admin".'/'.$objname; $aryParam[] = $objname; //Comment $foldernames = mb_split("/", $objname); $topfolder = $foldernames[0]; $comment = $userid.'|'.$ipaddress.'|'.$topfolder.'|'.$action.'|'.$type; if($action == 'rename'){ $comment .= '|'.$folder1.'|'.$folder2; }else{ //mkdir, rmdir $len = mb_strlen($topfolder); $without_top = mb_substr($objname, $len); $len = mb_strlen($without_top); if($len > 0 && mb_substr($without_top, 0, 1) == '/'){ $without_top = mb_substr($without_top, 1); } $comment .= '|'.$without_top; } $aryParam[] = $comment; print_r($aryParam);

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.01416.86
8.3.50.0050.01621.32
8.3.40.0120.00318.75
8.3.30.0110.00418.93
8.3.20.0040.00420.29
8.3.10.0080.00023.39
8.3.00.0000.00822.40
8.2.180.0120.00316.75
8.2.170.0090.00622.96
8.2.160.0030.01022.30
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0060.00317.88
8.2.110.0030.00719.40
8.2.100.0090.00317.75
8.2.90.0070.00019.36
8.2.80.0090.00017.97
8.2.70.0030.00617.50
8.2.60.0030.00618.18
8.2.50.0040.00418.07
8.2.40.0080.00021.32
8.2.30.0000.00819.85
8.2.20.0040.00417.70
8.2.10.0070.00018.25
8.2.00.0050.00218.18
8.1.280.0090.00925.92
8.1.270.0030.00620.33
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00322.14
8.1.230.0070.00417.79
8.1.220.0000.00717.79
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.84
8.1.160.0000.00822.18
8.1.150.0000.00719.07
8.1.140.0040.00417.58
8.1.130.0000.00717.85
8.1.120.0070.00017.56
8.1.110.0040.00417.50
8.1.100.0000.00917.67
8.1.90.0040.00417.46
8.1.80.0000.00717.56
8.1.70.0040.00417.54
8.1.60.0040.00417.68
8.1.50.0030.00517.57
8.1.40.0040.00417.63
8.1.30.0080.00017.70
8.1.20.0040.00417.77
8.1.10.0080.00017.72
8.1.00.0040.00717.51
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0000.00718.59
8.0.270.0000.00717.31
8.0.260.0000.00617.39
8.0.250.0050.00217.13
8.0.240.0040.00417.07
8.0.230.0050.00217.09
8.0.220.0030.00316.96
8.0.210.0000.00717.05
8.0.200.0030.00317.09
8.0.190.0050.00217.11
8.0.180.0040.00417.10
8.0.170.0050.00317.11
8.0.160.0070.00017.10
8.0.150.0000.00716.99
8.0.140.0040.00417.03
8.0.130.0030.00313.50
8.0.120.0080.00016.87
8.0.110.0040.00417.05
8.0.100.0040.00417.10
8.0.90.0040.00416.86
8.0.80.0100.01017.07
8.0.70.0000.00716.86
8.0.60.0000.00816.87
8.0.50.0000.00716.97
8.0.30.0070.01117.29
8.0.20.0060.01317.40
8.0.10.0000.00717.21
8.0.00.0070.01116.95
7.4.330.0020.00215.32
7.4.320.0030.00316.77
7.4.300.0060.00016.76
7.4.290.0030.00616.59
7.4.280.0040.00416.75
7.4.270.0000.00716.68
7.4.260.0030.00316.62
7.4.250.0040.00416.73
7.4.240.0010.00616.71
7.4.230.0030.00316.63
7.4.220.0040.01816.75
7.4.210.0000.01516.61
7.4.200.0030.00616.57
7.4.160.0060.00916.42
7.4.150.0030.02117.40
7.4.140.0120.00817.86
7.4.130.0120.00716.59
7.4.120.0050.01216.67
7.4.110.0120.00616.79
7.4.100.0100.01316.75
7.4.90.0110.00616.61
7.4.80.0170.00419.39
7.4.70.0120.00616.61
7.4.60.0060.01516.54
7.4.50.0050.00016.60
7.4.40.0090.00916.44
7.4.30.0120.00616.57
7.4.00.0030.01114.96
7.3.330.0000.00813.16
7.3.320.0000.00513.30
7.3.310.0040.00416.50
7.3.300.0000.00716.40
7.3.290.0080.00716.38
7.3.280.0120.00416.37
7.3.270.0110.00717.40
7.3.260.0090.00916.36
7.3.250.0110.00716.35
7.3.240.0090.01216.59
7.3.230.0070.01516.63
7.3.210.0120.00616.29
7.3.200.0040.01216.52
7.3.190.0130.00316.30
7.3.180.0100.00616.64
7.3.170.0100.00516.40
7.3.160.0060.01016.52
7.3.120.0000.01316.90
7.3.110.0130.00316.90
7.3.100.0030.00916.90
7.3.90.0030.01416.90
7.3.80.0090.00616.90
7.3.70.0080.00916.90
7.3.60.0060.00616.90
7.3.50.0000.00816.90
7.3.40.0030.01016.90
7.3.30.0070.00716.90
7.3.20.0110.00316.90
7.3.10.0100.00616.90
7.3.00.0030.01016.90
7.2.330.0060.01016.63
7.2.320.0130.00516.72
7.2.310.0070.01116.80
7.2.300.0000.01616.73
7.2.290.0120.00616.49
7.2.240.0040.00816.90
7.2.230.0070.00716.90
7.2.220.0030.01016.90
7.2.210.0070.00416.90
7.2.200.0090.00616.90
7.2.190.0000.01116.90
7.2.180.0130.00316.90
7.2.170.0110.00616.90
7.2.160.0070.01016.90
7.2.150.0030.00916.96
7.2.140.0030.00916.90
7.2.130.0060.00616.90
7.2.120.0060.00916.99
7.2.110.0040.00716.96
7.2.100.0030.01317.03
7.2.90.0030.00917.05
7.2.80.0000.01616.90
7.2.70.0070.01116.93
7.2.60.0060.00817.05
7.2.50.0040.01117.01
7.2.40.0070.00716.90
7.2.30.0070.00717.07
7.2.20.0000.01016.90
7.2.10.0070.01117.00
7.2.00.0080.00818.31
7.1.330.0090.00616.90
7.1.320.0070.00716.90
7.1.310.0060.00916.90
7.1.300.0030.01316.90
7.1.290.0040.01116.90
7.1.280.0070.00716.90
7.1.270.0090.00316.90
7.1.260.0090.00316.90
7.1.250.0060.00816.90
7.1.100.0100.00318.16
7.1.70.0000.00817.24
7.1.60.0130.01319.18
7.1.50.0060.00816.99
7.1.00.0070.07322.34
7.0.200.0140.01016.64
7.0.60.0000.04719.92
7.0.50.0070.04017.88
7.0.40.0130.06720.13
7.0.30.0230.07720.14
7.0.20.0300.06020.15
7.0.10.0030.07020.34
7.0.00.0030.04320.06
5.6.280.0030.05021.07
5.6.210.0130.08020.75
5.6.200.0070.08318.25
5.6.190.0130.07020.63
5.6.180.0330.05720.50
5.6.170.0170.04720.50
5.6.160.0170.07320.45
5.6.150.0070.07018.18
5.6.140.0030.06018.27
5.6.130.0100.08018.16
5.6.120.0170.07321.12
5.6.110.0070.05721.05
5.6.100.0030.04020.98
5.6.90.0000.09021.08
5.6.80.0070.04020.44
5.6.70.4670.03720.35
5.5.350.0130.06720.41
5.5.340.0100.06318.09
5.5.330.0030.08720.42
5.5.320.0200.07320.32
5.5.310.0300.07020.35
5.5.300.0100.07317.95
5.5.290.0130.06717.93
5.5.280.0070.06320.69
5.5.270.0070.07320.89
5.5.260.0130.07720.88
5.5.250.0100.08020.59
5.5.240.0230.03720.13
5.4.450.0800.06019.62
5.4.440.0600.06019.40
5.4.430.0670.06319.60
5.4.420.0830.07719.16
5.4.410.0430.06019.34
5.4.400.0500.05719.17
5.4.390.0230.05319.26
5.4.380.0230.07719.05
5.4.370.0230.06019.30
5.4.360.0230.05718.84
5.4.350.0330.05719.16
5.4.340.0170.06319.28
5.4.320.0230.05319.29
5.4.310.0230.05319.05
5.4.300.0330.06019.28
5.4.290.0200.05719.12
5.4.280.0130.06719.13
5.4.270.0130.05718.84
5.4.260.0300.05318.87
5.4.250.0200.05018.97
5.4.240.0230.05319.36
5.4.230.0300.05319.14
5.4.220.0300.04319.27
5.4.210.0270.05018.98
5.4.200.0200.04716.82
5.4.190.0270.05719.11
5.4.180.0270.04319.00
5.4.170.0100.06318.89
5.4.160.0270.04319.12
5.4.150.0170.05019.31
5.4.140.0530.05716.46
5.4.130.0530.05716.75
5.4.120.0970.05016.39
5.4.110.0270.05316.54
5.4.100.0430.05716.46
5.4.90.0700.04716.70
5.4.80.0700.05016.31
5.4.70.0630.06016.42
5.4.60.0670.04716.27
5.4.50.0570.05016.29
5.4.40.0670.05316.25
5.4.30.0570.04316.50
5.4.20.0570.04716.24
5.4.10.0630.04716.38
5.4.00.0800.06015.76
5.3.290.0270.05714.57
5.3.280.0300.06014.66
5.3.270.0200.05314.76
5.3.260.0330.04714.62
5.3.250.0170.05314.60
5.3.240.0830.04014.53
5.3.230.0530.05714.75
5.3.220.0770.05714.58
5.3.210.0630.06014.44
5.3.200.0630.04714.80
5.3.190.0570.05014.48
5.3.180.1070.05714.58
5.3.170.0700.04314.47
5.3.160.0570.05314.54
5.3.150.0600.05014.54
5.3.140.0600.06314.57
5.3.130.0530.06014.56
5.3.120.0770.04714.70
5.3.110.0570.05014.61
5.3.100.0630.05014.13
5.3.90.0630.06314.04
5.3.80.0530.05313.94
5.3.70.0600.05313.94
5.3.60.0670.04313.92
5.3.50.0670.06713.89
5.3.40.0430.05314.01
5.3.30.0530.05013.82
5.3.20.0670.04713.71
5.3.10.0500.04713.67
5.3.00.0530.04313.70
5.2.170.0430.04711.16
5.2.160.0630.03711.06
5.2.150.0430.05011.16
5.2.140.0500.05311.30
5.2.130.0600.04311.02
5.2.120.0570.05011.05
5.2.110.0200.04711.02
5.2.100.0070.05711.04
5.2.90.0470.04011.17
5.2.80.0500.03711.00
5.2.70.0470.04011.03
5.2.60.0430.04310.97
5.2.50.0170.04310.94
5.2.40.0370.04010.96
5.2.30.0600.04011.20
5.2.20.0400.04310.94
5.2.10.0370.04711.02
5.2.00.0430.04010.64
5.1.60.0400.0409.90
5.1.50.0470.0479.95
5.1.40.0330.0339.97
5.1.30.0470.03310.21
5.1.20.0400.05710.44
5.1.10.0330.05010.25
5.1.00.0500.04010.11
5.0.50.0030.0378.45
5.0.40.0100.0238.46
5.0.30.0070.0438.27
5.0.20.0070.0308.24
5.0.10.0070.0408.34
5.0.00.0130.0408.02
4.4.90.0200.0207.14
4.4.80.0200.0277.34
4.4.70.0230.0177.34
4.4.60.0130.0277.34
4.4.50.0200.0237.34
4.4.40.0170.0377.34
4.4.30.0230.0207.34
4.4.20.0270.0237.33
4.4.10.0130.0277.33
4.4.00.0170.0277.33
4.3.110.0100.0207.33
4.3.100.0100.0207.33
4.3.90.0070.0337.33
4.3.80.0100.0307.33
4.3.70.0030.0237.33
4.3.60.0070.0207.33
4.3.50.0070.0237.33
4.3.40.0100.0307.33
4.3.30.0070.0277.33
4.3.20.0130.0177.33
4.3.10.0000.0337.33
4.3.00.0000.0277.33

preferences:
29.48 ms | 401 KiB | 5 Q