3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $str = "1_1341383124_Photo /Jul \ fdsfs04, 423!g%$#dfas--543*@ 1 22 02 AM_20130724204332.png"; echo $a = strrpos($str,"."); $str2 = substr($str,0,$a); $str3 = preg_replace("/[-, :;.\/#\\!@$%^*-]/","_",$str2); $str3 = preg_replace("/[_]+/","_",$str3); echo $str3;

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.0090.00616.63
8.3.50.0130.00517.51
8.3.40.0120.00319.01
8.3.30.0040.01118.91
8.3.20.0030.00619.07
8.3.10.0090.00620.77
8.3.00.0090.00317.88
8.2.180.0100.01016.50
8.2.170.0110.00322.96
8.2.160.0110.01121.32
8.2.150.0080.00024.18
8.2.140.0040.01424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.82
8.2.110.0060.00320.96
8.2.100.0050.00518.03
8.2.90.0030.00619.08
8.2.80.0000.00818.03
8.2.70.0080.00017.71
8.2.60.0070.00417.68
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0080.00018.14
8.2.20.0030.00617.68
8.2.10.0090.00017.76
8.2.00.0040.00417.94
8.1.280.0120.00325.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00320.62
8.1.230.0070.00420.89
8.1.220.0060.00317.79
8.1.210.0120.00018.84
8.1.200.0030.00717.35
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0030.00518.73
8.1.160.0000.00718.81
8.1.150.0030.00518.62
8.1.140.0050.00517.61
8.1.130.0030.00317.84
8.1.120.0000.00817.61
8.1.110.0020.00517.57
8.1.100.0040.00417.53
8.1.90.0040.00317.44
8.1.80.0070.00017.39
8.1.70.0030.00317.45
8.1.60.0000.01117.64
8.1.50.0000.00917.48
8.1.40.0000.00717.66
8.1.30.0040.00417.74
8.1.20.0030.00517.63
8.1.10.0040.00417.63
8.1.00.0020.00517.42
8.0.300.0050.00220.11
8.0.290.0040.00416.75
8.0.280.0080.00018.46
8.0.270.0040.00417.20
8.0.260.0030.00316.82
8.0.250.0070.00017.07
8.0.240.0000.00817.13
8.0.230.0070.00017.03
8.0.220.0050.00317.04
8.0.210.0040.00416.95
8.0.200.0000.00716.92
8.0.190.0000.00817.02
8.0.180.0000.00716.88
8.0.170.0060.00317.01
8.0.160.0030.00517.04
8.0.150.0000.00816.90
8.0.140.0080.00416.86
8.0.130.0000.00613.44
8.0.120.0080.00016.97
8.0.110.0000.00816.85
8.0.100.0050.00216.83
8.0.90.0030.00316.94
8.0.80.0030.01316.95
8.0.70.0030.00516.79
8.0.60.0000.00716.77
8.0.50.0030.00517.09
8.0.30.0050.01317.22
8.0.20.0060.01217.31
8.0.10.0000.00716.96
8.0.00.0060.01116.87
7.4.330.0000.00513.10
7.4.320.0030.00316.66
7.4.300.0000.00716.77
7.4.290.0000.01016.73
7.4.280.0050.00316.77
7.4.270.0000.00716.55
7.4.260.0060.00013.34
7.4.250.0080.00016.64
7.4.240.0040.00416.60
7.4.230.0030.00516.73
7.4.220.0100.01716.80
7.4.210.0040.01316.71
7.4.200.0030.00316.74
7.4.190.0030.00316.68
7.4.160.0130.00316.60
7.4.150.0070.01316.71
7.4.140.0110.00816.58
7.4.130.0070.01116.48
7.4.120.0110.00616.62
7.4.110.0030.01416.66
7.4.100.0060.01116.67
7.4.90.0100.01016.49
7.4.80.0090.00816.69
7.4.70.0140.01016.67
7.4.60.0110.00716.43
7.4.50.0050.00016.41
7.4.40.0120.00316.51
7.4.30.0120.00616.63
7.4.00.0070.01115.07
7.3.330.0030.00313.15
7.3.320.0030.00313.06
7.3.310.0030.00516.17
7.3.300.0040.00416.39
7.3.290.0100.01116.33
7.3.280.0060.01016.38
7.3.270.0100.00616.36
7.3.260.0130.00816.41
7.3.250.0140.00316.45
7.3.240.0030.01216.34
7.3.230.0150.00416.66
7.3.210.0100.00716.34
7.3.200.0030.01419.39
7.3.190.0130.00616.51
7.3.180.0030.01316.38
7.3.170.0200.00016.43
7.3.160.0030.01316.48
7.3.120.0070.00815.03
7.3.110.0090.00914.90
7.3.100.0030.01214.65
7.3.90.0030.01014.65
7.3.80.0130.00314.86
7.3.70.0060.00614.88
7.3.60.0070.00414.94
7.3.50.0030.00615.03
7.3.40.0030.00614.84
7.3.30.0030.01014.94
7.3.20.0070.01016.76
7.3.10.0090.00416.67
7.3.00.0090.00516.67
7.2.330.0060.01216.77
7.2.320.0180.00616.73
7.2.310.0090.01116.74
7.2.300.0140.02016.68
7.2.290.0100.00616.61
7.2.250.0030.01414.87
7.2.240.0030.01614.83
7.2.230.0100.00715.16
7.2.220.0100.00715.08
7.2.210.0000.01715.34
7.2.200.0040.00815.15
7.2.190.0000.01415.13
7.2.180.0030.00715.11
7.2.170.0090.00315.37
7.2.130.0080.00416.96
7.2.120.0120.00816.80
7.2.110.0060.01316.97
7.2.100.0100.00717.03
7.2.90.0100.00717.01
7.2.80.0130.00317.17
7.2.70.0100.00717.04
7.2.60.0150.00317.02
7.2.50.0100.00317.09
7.2.40.0100.00716.87
7.2.30.0070.01017.04
7.2.20.0130.00717.13
7.2.10.0100.00316.80
7.2.00.0130.00716.78
7.1.330.0030.01215.70
7.1.320.0070.00715.93
7.1.310.0100.00316.03
7.1.300.0060.00315.90
7.1.290.0060.00615.86
7.1.280.0060.00515.89
7.1.270.0070.00715.77
7.1.260.0070.00715.93
7.1.250.0170.00316.02
7.1.240.0070.01015.65
7.1.230.0150.00715.49
7.1.220.0160.00315.58
7.1.210.0070.00716.01
7.1.200.0060.01516.01
7.1.190.0110.00716.04
7.1.180.0030.01215.69
7.1.170.0140.00015.93
7.1.160.0130.00615.89
7.1.150.0110.00515.95
7.1.140.0090.00615.87
7.1.130.0160.00715.86
7.1.120.0120.00415.58
7.1.110.0110.00715.92
7.1.100.0070.00716.98
7.1.90.0160.00015.86
7.1.80.0060.01215.86
7.1.70.0080.00416.64
7.1.60.0080.01317.63
7.1.50.0070.01316.53
7.1.40.0100.00715.92
7.1.30.0030.01315.65
7.1.20.0120.00615.75
7.1.10.0060.01015.79
7.1.00.0070.04219.12
7.0.330.0130.00715.48
7.0.320.0130.00315.61
7.0.310.0060.00915.54
7.0.300.0040.01215.39
7.0.290.0110.00715.14
7.0.280.0070.01115.46
7.0.270.0080.01115.21
7.0.260.0110.00415.54
7.0.250.0140.00315.36
7.0.240.0110.00615.58
7.0.230.0030.01515.44
7.0.220.0040.01115.59
7.0.210.0060.00915.34
7.0.200.0050.00716.13
7.0.190.0090.00315.63
7.0.180.0080.00515.32
7.0.170.0100.00315.57
7.0.160.0090.00615.50
7.0.150.0080.00815.15
7.0.140.0080.03518.71
7.0.130.0090.00915.63
7.0.120.0070.03818.81
7.0.110.0150.00015.29
7.0.100.0170.00015.21
7.0.90.0040.01315.22
7.0.80.0140.00315.41
7.0.70.0160.00015.26
7.0.60.0040.04617.65
7.0.50.0050.02716.75
7.0.40.0100.03516.62
7.0.30.0160.03316.78
7.0.20.0150.03316.82
7.0.10.0230.03616.86
7.0.00.0100.04016.81
5.6.380.0090.00913.97
5.6.370.0060.00914.14
5.6.360.0080.00614.06
5.6.350.0150.00314.25
5.6.340.0030.00713.96
5.6.330.0070.00714.14
5.6.320.0140.00314.47
5.6.310.0090.00614.36
5.6.300.0000.01313.77
5.6.290.0090.00614.20
5.6.280.0000.04717.71
5.6.270.0030.00914.02
5.6.260.0090.00914.38
5.6.250.0000.01613.99
5.6.240.0060.01014.17
5.6.230.0090.00614.13
5.6.220.0090.00614.23
5.6.210.0130.04017.36
5.6.200.0050.03616.27
5.6.190.0060.02317.45
5.6.180.0150.02517.44
5.6.170.0210.02617.21
5.6.160.0080.04117.28
5.6.150.0100.03616.05
5.6.140.0090.03016.19
5.6.130.0070.04816.10
5.6.120.0060.04617.60
5.6.110.0060.04817.50
5.6.100.0070.03417.56
5.6.90.0050.04217.54
5.6.80.0090.03917.13
5.6.70.2230.02317.18
5.6.60.0040.01313.96
5.6.50.0030.01014.22
5.6.40.0100.00714.18
5.6.30.0100.00313.85
5.6.20.0100.00714.14
5.6.10.0070.00714.19
5.6.00.0000.01113.88
5.5.380.0040.00710.99
5.5.370.0060.00611.11
5.5.360.0030.00811.05
5.5.350.0180.03815.54
5.5.340.0080.04214.41
5.5.330.0070.02915.38
5.5.320.0130.04515.58
5.5.310.0130.02915.73
5.5.300.0020.02614.38
5.5.290.0050.03214.51
5.5.280.0050.04415.95
5.5.270.0070.02615.79
5.5.260.0120.04015.96
5.5.250.0080.03415.79
5.5.240.0070.02015.49
5.5.230.0110.00310.97
5.5.220.0070.00011.04
5.5.210.0060.00610.84
5.5.200.0100.00311.11
5.5.190.0040.00411.00
5.5.180.0070.00710.76
5.5.170.0070.00310.97
5.5.160.0090.00410.98
5.5.150.0000.01110.82
5.5.140.0090.00310.96
5.5.130.0000.01210.86
5.5.120.0030.00610.79
5.5.110.0030.00611.05
5.5.100.0080.00411.04
5.5.90.0060.00310.92
5.5.80.0100.00010.98
5.5.70.0030.01210.89
5.5.60.0000.00910.73
5.5.50.0090.00010.89
5.5.40.0080.00010.57
5.5.30.0100.00010.91
5.5.20.0090.00410.95
5.5.10.0050.00510.58
5.5.00.0030.00711.07
5.4.450.0070.02415.21
5.4.440.0100.04215.12
5.4.430.0020.03515.06
5.4.420.0110.02315.23
5.4.410.0020.04815.28
5.4.400.0090.04015.08
5.4.390.0120.04015.06
5.4.380.0080.02514.87
5.4.370.0040.04515.00
5.4.360.0050.04114.91
5.4.350.0120.03815.21
5.4.340.0070.04214.83
5.4.330.0130.00011.09
5.4.320.0120.04015.14
5.4.310.0100.02014.87
5.4.300.0080.02315.15
5.4.290.0130.02115.06
5.4.280.0050.02714.99
5.4.270.0100.03814.94
5.4.260.0120.03615.10
5.4.250.0070.02515.16
5.4.240.0060.04215.15
5.4.230.0070.02114.97
5.4.220.0030.02614.85
5.4.210.0100.03714.89
5.4.200.0070.02215.04
5.4.190.0110.03515.10
5.4.180.0060.04015.00
5.4.170.0070.04015.01
5.4.160.0020.03014.84
5.4.150.0070.03914.83
5.4.140.0100.04113.55
5.4.130.0030.02913.62
5.4.120.0040.04313.61
5.4.110.0080.03813.61
5.4.100.0080.01713.63
5.4.90.0070.03213.71
5.4.80.0020.02513.61
5.4.70.0090.03813.58
5.4.60.0030.03013.71
5.4.50.0070.03913.61
5.4.40.0060.04113.66
5.4.30.0050.03813.68
5.4.20.0020.02413.46
5.4.10.0000.02513.64
5.4.00.0040.02113.41
5.3.290.0030.02912.53
5.3.280.0080.01812.48
5.3.270.0080.03912.43
5.3.260.0030.03312.51
5.3.250.0080.03212.61
5.3.240.0050.03112.43
5.3.230.0020.03112.41
5.3.220.0150.03012.38
5.3.210.0060.03312.43
5.3.200.0070.03712.42
5.3.190.0080.02612.40
5.3.180.0030.02112.54
5.3.170.0030.03812.48
5.3.160.0090.03712.41
5.3.150.0050.02712.53
5.3.140.0050.03912.51
5.3.130.0050.03612.43
5.3.120.0070.02812.47
5.3.110.0060.03012.49
5.3.100.0050.02112.21
5.3.90.0040.01912.18
5.3.80.0030.02112.10
5.3.70.0070.01812.01
5.3.60.0040.02012.13
5.3.50.0050.02012.10
5.3.40.0030.02012.10
5.3.30.0060.01712.12
5.3.20.0030.02011.98
5.3.10.0030.02211.95
5.3.00.0160.00811.79
5.2.170.0010.01810.26
5.2.160.0000.01910.10
5.2.150.0020.01810.17
5.2.140.0010.01810.35
5.2.130.0030.01710.21
5.2.120.0030.02110.23
5.2.110.0010.01910.27
5.2.100.0020.01910.29
5.2.90.0070.01310.26
5.2.80.0010.01810.05
5.2.70.0030.01810.18
5.2.60.0040.01710.14
5.2.50.0050.01510.13
5.2.40.0070.01310.03
5.2.30.0040.01810.01
5.2.20.0030.01810.03
5.2.10.0040.01510.04
5.2.00.0030.0169.92
5.1.60.0060.0129.37
5.1.50.0040.0159.29
5.1.40.0040.0149.33
5.1.30.0020.0169.53
5.1.20.0030.0159.52
5.1.10.0060.0129.38
5.1.00.0050.0139.36
5.0.50.0000.0138.57
5.0.40.0020.0128.56
5.0.30.0010.0168.51
5.0.20.0040.0088.51
5.0.10.0030.0108.51
5.0.00.0000.0208.51
4.4.90.0020.0088.51
4.4.80.0000.0108.51
4.4.70.0030.0088.51
4.4.60.0000.0118.51
4.4.50.0000.0118.51
4.4.40.0000.0168.51
4.4.30.0010.0108.51
4.4.20.0040.0098.51
4.4.10.0020.0108.51
4.4.00.0000.0148.51
4.3.110.0000.0108.51
4.3.100.0000.0108.51
4.3.90.0010.0078.51
4.3.80.0020.0148.51
4.3.70.0030.0088.51
4.3.60.0020.0078.51
4.3.50.0000.0128.51
4.3.40.0050.0108.51
4.3.30.0000.0108.51
4.3.20.0020.0138.51
4.3.10.0000.0098.51
4.3.00.0000.0108.51

preferences:
40.05 ms | 401 KiB | 5 Q