3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "/1asdfsafsadf/2asdfvzxcgdtgh/3/"; $paramArr = explode("/",$string); $first = array_key_exists(1,$paramArr) ? $paramArr[1] : 'leeg'; echo $first;

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.0180.00316.50
8.3.50.0120.00521.99
8.3.40.0070.00719.02
8.3.30.0110.00418.96
8.3.20.0040.00420.15
8.3.10.0080.00023.61
8.3.00.0000.00720.70
8.2.180.0110.00716.75
8.2.170.0100.01022.96
8.2.160.0170.00022.26
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0140.00326.16
8.2.120.0050.00220.44
8.2.110.0050.00521.95
8.2.100.0110.00017.72
8.2.90.0060.00319.36
8.2.80.0050.00318.04
8.2.70.0070.00417.50
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0070.00018.22
8.2.30.0050.00218.03
8.2.20.0000.00717.58
8.2.10.0080.00017.71
8.2.00.0000.00817.83
8.1.280.0040.01225.92
8.1.270.0000.00823.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00623.69
8.1.230.0070.00319.04
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00817.23
8.1.190.0040.00417.40
8.1.180.0040.00418.10
8.1.170.0030.00618.52
8.1.160.0000.00921.98
8.1.150.0070.00018.56
8.1.140.0040.00417.38
8.1.130.0070.00017.92
8.1.120.0000.00817.39
8.1.110.0000.00717.27
8.1.100.0050.00317.28
8.1.90.0000.00717.35
8.1.80.0040.00417.39
8.1.70.0000.00717.33
8.1.60.0040.00417.51
8.1.50.0000.00817.28
8.1.40.0040.00417.52
8.1.30.0030.00617.52
8.1.20.0080.00017.56
8.1.10.0050.00317.50
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0030.00317.18
8.0.280.0000.00718.36
8.0.270.0000.00717.15
8.0.260.0070.00016.79
8.0.250.0000.00716.99
8.0.240.0030.00616.84
8.0.230.0030.00316.85
8.0.220.0030.00316.70
8.0.210.0060.00016.71
8.0.200.0030.00316.97
8.0.190.0040.00416.91
8.0.180.0000.00716.84
8.0.170.0000.00816.84
8.0.160.0000.00716.95
8.0.150.0070.00016.82
8.0.140.0080.00016.79
8.0.130.0060.00013.20
8.0.120.0000.00816.72
8.0.110.0000.00816.80
8.0.100.0040.00416.77
8.0.90.0000.00816.88
8.0.80.0160.00716.83
8.0.70.0040.00416.86
8.0.60.0000.00716.84
8.0.50.0030.00316.88
8.0.30.0100.01117.10
8.0.20.0150.00617.40
8.0.10.0070.00016.92
8.0.00.0090.01016.82
7.4.330.0030.00315.14
7.4.320.0030.00316.50
7.4.300.0030.00316.56
7.4.290.0060.00316.63
7.4.280.0000.00716.59
7.4.270.0030.00316.48
7.4.260.0000.00716.55
7.4.250.0070.00016.38
7.4.240.0020.00516.58
7.4.230.0030.00316.61
7.4.220.0150.00316.39
7.4.210.0060.01016.55
7.4.200.0070.00016.68
7.4.190.0000.00616.73
7.4.160.0080.00816.68
7.4.150.0130.00617.40
7.4.140.0130.00517.86
7.4.130.0030.01416.40
7.4.120.0080.00916.56
7.4.110.0130.00616.45
7.4.100.0170.00816.38
7.4.90.0160.00616.54
7.4.80.0160.00316.57
7.4.70.0100.00716.46
7.4.60.0030.01316.39
7.4.50.0000.00816.55
7.4.40.0030.01322.77
7.4.30.0060.00916.60
7.4.00.0080.01014.91
7.3.330.0050.00013.25
7.3.320.0030.00313.17
7.3.310.0030.00316.27
7.3.300.0000.00716.12
7.3.290.0070.01316.23
7.3.280.0120.00516.25
7.3.270.0100.00717.40
7.3.260.0070.01216.34
7.3.250.0090.00916.56
7.3.240.0160.00316.37
7.3.230.0040.01416.39
7.3.210.0100.01316.51
7.3.200.0100.01319.39
7.3.190.0070.01416.34
7.3.180.0040.01216.52
7.3.170.0090.00616.61
7.3.160.0120.00316.32
7.3.120.0090.00714.81
7.3.110.0120.00614.79
7.3.100.0040.00714.84
7.3.90.0040.01214.84
7.3.80.0090.00315.18
7.3.70.0090.00314.72
7.3.60.0050.00514.72
7.3.50.0000.01614.84
7.3.40.0000.01014.59
7.3.30.0040.01114.92
7.3.20.0100.00316.83
7.3.10.0060.00916.52
7.3.00.0060.00316.44
7.2.330.0070.00916.54
7.2.320.0110.00516.36
7.2.310.0140.00316.43
7.2.300.0130.00416.66
7.2.290.0090.00916.75
7.2.250.0100.01015.20
7.2.240.0070.01014.92
7.2.230.0070.00715.09
7.2.220.0060.00914.64
7.2.210.0060.01214.69
7.2.200.0060.00614.93
7.2.190.0100.00614.95
7.2.180.0040.01114.89
7.2.170.0030.01015.02
7.2.60.0090.00616.98
7.2.00.0060.00919.52
7.1.330.0040.01115.75
7.1.320.0030.00915.92
7.1.310.0040.01115.90
7.1.300.0070.00715.86
7.1.290.0000.01215.83
7.1.280.0060.00315.53
7.1.270.0030.00915.91
7.1.260.0070.00315.80
7.1.200.0110.00415.89
7.1.100.0060.00617.96
7.1.70.0070.00016.71
7.1.60.0100.01419.29
7.1.50.0060.01816.92
7.1.00.0030.07722.57
7.0.200.0100.00316.86
7.0.140.0070.07022.11
7.0.60.0100.08019.90
7.0.50.0070.08717.66
7.0.40.0200.07320.24
7.0.30.0300.08320.13
7.0.20.0330.08020.18
7.0.10.0400.04720.09
7.0.00.0100.07320.00
5.6.280.0030.07320.77
5.6.210.0100.08320.70
5.6.200.0100.07718.09
5.6.190.0200.08020.41
5.6.180.0430.08020.46
5.6.170.0070.05020.33
5.6.160.0070.08020.52
5.6.150.0030.04018.18
5.6.140.0100.04318.12
5.6.130.0030.08318.15
5.6.120.0070.08721.02
5.6.110.0100.06721.12
5.6.100.0100.08020.96
5.6.90.0100.05720.94
5.6.80.0070.07720.36
5.6.70.3500.03320.49
5.5.350.0030.06720.32
5.5.340.0130.05717.97
5.5.330.0030.05020.21
5.5.320.0000.05720.30
5.5.310.0200.04020.29
5.5.300.0030.04318.00
5.5.290.0070.08017.88
5.5.280.0130.04720.76
5.5.270.0070.05320.76
5.5.260.0270.04020.95
5.5.250.0030.07720.69
5.5.240.0000.08320.14
5.4.450.0700.03719.41
5.4.440.0870.05019.42
5.4.430.0670.06719.49
5.4.420.0630.05719.34
5.4.410.0970.07319.38
5.4.400.1200.06018.61
5.4.390.1200.05318.70
5.4.380.0130.06018.74
5.4.370.0200.05018.51
5.4.360.0130.07018.61
5.4.350.0170.05318.61
5.4.340.0230.04318.61
5.4.320.0090.03712.45
5.4.310.0090.03912.45
5.4.300.0050.04012.45
5.4.290.0060.03812.45
5.4.280.0050.03512.35
5.4.270.0070.04212.35
5.4.260.0070.03612.35
5.4.250.0090.04312.34
5.4.240.0070.03912.34
5.4.230.0080.04212.34
5.4.220.0190.04212.32
5.4.210.0190.04512.32
5.4.200.0140.04412.32
5.4.190.0160.04412.32
5.4.180.0200.06012.32
5.4.170.0200.04312.32
5.4.160.0160.04512.32
5.4.150.0150.04512.31
5.4.140.0280.09212.00
5.4.130.0290.09311.99
5.4.120.0450.07211.95
5.4.110.0180.04111.94
5.4.100.0310.09111.94
5.4.90.0480.07911.94
5.4.80.0400.08311.95
5.4.70.0160.04411.94
5.4.60.0190.04211.94
5.4.50.0190.04711.94
5.4.40.0480.10811.92
5.4.30.0490.10711.93
5.4.20.0420.08311.92
5.4.10.0290.09311.92
5.4.00.0190.04411.41
5.3.290.0050.04512.80
5.3.280.0090.04012.71
5.3.270.0260.09812.72
5.3.260.0310.05412.72
5.3.250.0220.05512.72
5.3.240.0200.04712.72
5.3.230.0310.09512.71
5.3.220.0320.09812.68
5.3.210.0410.08912.68
5.3.200.0200.05712.68
5.3.190.0390.09712.67
5.3.180.0350.09212.67
5.3.170.0390.08112.67
5.3.160.0230.04012.67
5.3.150.0170.04412.68
5.3.140.0140.04612.66
5.3.130.0190.04212.66
5.3.120.0160.04612.66
5.3.110.0160.04512.66
5.3.100.0180.04412.12
5.3.90.0120.04712.08
5.3.80.0160.04612.07
5.3.70.0150.04512.07
5.3.60.0150.04712.07
5.3.50.0140.04712.00
5.3.40.0220.06812.00
5.3.30.0180.03911.94
5.3.20.0170.04111.71
5.3.10.0170.04011.67
5.3.00.0170.04111.65
5.2.170.0130.0349.16
5.2.160.0160.0319.16
5.2.150.0140.0339.16
5.2.140.0150.0329.16
5.2.130.0160.0329.12
5.2.120.0100.0369.12
5.2.110.0180.0309.12
5.2.100.0210.0569.12
5.2.90.0130.0359.12
5.2.80.0110.0379.11
5.2.70.0120.0349.11
5.2.60.0130.0339.07
5.2.50.0100.0389.04
5.2.40.0120.0359.02
5.2.30.0140.0328.98
5.2.20.0160.0318.97
5.2.10.0120.0368.89
5.2.00.0120.0348.76
5.1.60.0090.0308.05
5.1.50.0110.0308.04
5.1.40.0140.0258.02
5.1.30.0140.0288.37
5.1.20.0270.0758.40
5.1.10.0110.0328.12
5.1.00.0090.0338.12
5.0.50.0130.0226.60
5.0.40.0100.0226.45
5.0.30.0070.0376.27
5.0.20.0110.0236.25
5.0.10.0090.0246.22
5.0.00.0060.0386.21
4.4.90.0080.0174.78
4.4.80.0110.0134.75
4.4.70.0070.0204.75
4.4.60.0080.0174.75
4.4.50.0150.0134.77
4.4.40.0070.0324.71
4.4.30.0090.0184.76
4.4.20.0080.0214.84
4.4.10.0090.0184.85
4.4.00.0310.0674.75
4.3.110.0040.0234.67
4.3.100.0090.0174.67
4.3.90.0100.0154.63
4.3.80.0090.0294.58
4.3.70.0090.0164.63
4.3.60.0080.0174.63
4.3.50.0050.0214.62
4.3.40.0090.0264.54
4.3.30.0070.0203.29
4.3.20.0090.0183.27
4.3.10.0050.0193.22
4.3.00.0030.03012.57

preferences:
32.43 ms | 400 KiB | 5 Q