3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'test;cool@@'; function parseConditionString($sConditions) { $aConditions = array(); $aTmp = explode('@@', $sConditions); foreach ($aTmp as $sTmp) { $aParts = explode(';', $sTmp); if(isset($aParts[0]) && isset($aParts[1])){ $aConditions[$aParts[0]] = $aParts[1]; } } return $aConditions; } $var = parseConditionString($string); print_r($var);

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.0060.00918.27
8.3.60.0140.00716.75
8.3.50.0100.00522.74
8.3.40.0150.00318.79
8.3.30.0100.00319.01
8.3.20.0050.00220.37
8.3.10.0050.00223.65
8.3.00.0000.00819.38
8.2.180.0150.00716.63
8.2.170.0040.01122.96
8.2.160.0100.00720.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0030.00521.05
8.2.110.0030.00722.08
8.2.100.0110.00018.16
8.2.90.0000.00819.25
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0060.00317.93
8.2.50.0000.00918.07
8.2.40.0000.00818.09
8.2.30.0040.00419.85
8.2.20.0040.00417.75
8.2.10.0040.00418.11
8.2.00.0040.00417.70
8.1.280.0130.00725.92
8.1.270.0040.00423.83
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00323.79
8.1.230.0060.00619.09
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0120.00217.25
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0050.00518.66
8.1.160.0050.00321.90
8.1.150.0000.00718.90
8.1.140.0050.00217.38
8.1.130.0000.00817.82
8.1.120.0000.00717.50
8.1.110.0030.00517.41
8.1.100.0030.00317.45
8.1.90.0040.00417.53
8.1.80.0070.00017.53
8.1.70.0000.00817.36
8.1.60.0040.00417.58
8.1.50.0040.00417.43
8.1.40.0090.00017.50
8.1.30.0040.00417.73
8.1.20.0070.00017.68
8.1.10.0040.00417.42
8.1.00.0040.00417.30
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00818.45
8.0.270.0040.00417.21
8.0.260.0040.00417.33
8.0.250.0030.00316.87
8.0.240.0030.00316.93
8.0.230.0030.00316.92
8.0.220.0030.00316.90
8.0.210.0030.00516.91
8.0.200.0030.00317.03
8.0.190.0000.00916.93
8.0.180.0000.00816.88
8.0.170.0060.00316.98
8.0.160.0070.00016.92
8.0.150.0020.00516.82
8.0.140.0030.00616.66
8.0.130.0000.00513.42
8.0.120.0040.00416.89
8.0.110.0000.00816.81
8.0.100.0040.00416.95
8.0.90.0040.00416.95
8.0.80.0140.00416.89
8.0.70.0040.00416.90
8.0.60.0080.00016.78
8.0.50.0070.00016.89
8.0.30.0120.00917.11
8.0.20.0120.00517.40
8.0.10.0040.00416.89
8.0.00.0090.00716.81
7.4.330.0020.00215.12
7.4.320.0000.00616.61
7.4.300.0000.00616.61
7.4.290.0030.00316.37
7.4.280.0090.00016.37
7.4.270.0030.00316.37
7.4.260.0030.00316.39
7.4.250.0000.00816.57
7.4.240.0050.00316.45
7.4.230.0040.00416.26
7.4.220.0120.00916.62
7.4.210.0130.00316.64
7.4.200.0000.00716.68
7.4.160.0080.00816.49
7.4.150.0140.00717.40
7.4.140.0080.01017.86
7.4.130.0060.01316.44
7.4.120.0060.01116.47
7.4.110.0080.00816.53
7.4.100.0080.00816.43
7.4.90.0120.00616.46
7.4.80.0140.00719.39
7.4.70.0070.01016.51
7.4.60.0180.00616.46
7.4.50.0030.00516.28
7.4.40.0190.00316.60
7.4.30.0030.01216.54
7.4.00.0070.01114.82
7.3.330.0030.00313.25
7.3.320.0000.00513.38
7.3.310.0030.00316.27
7.3.300.0030.00316.38
7.3.290.0070.01016.43
7.3.280.0090.00616.41
7.3.270.0160.00317.40
7.3.260.0030.02416.61
7.3.250.0100.00716.68
7.3.240.0060.01016.31
7.3.230.0120.00616.39
7.3.210.0070.01016.62
7.3.200.0030.01619.39
7.3.190.0110.00816.62
7.3.180.0100.00616.44
7.3.170.0100.01316.59
7.3.160.0090.00916.22
7.2.330.0130.01116.49
7.2.320.0070.01116.83
7.2.310.0090.01216.79
7.2.300.0130.00616.78
7.2.290.0060.01216.64
7.2.60.0030.01017.02
7.2.00.0000.01219.45
7.1.200.0040.01115.69
7.1.100.0030.00617.95
7.1.70.0050.00217.09
7.1.60.0060.01819.40
7.1.50.0200.01734.54
7.1.00.0070.07322.34
7.0.200.0000.00816.53
7.0.140.0070.07021.90
7.0.60.0030.08320.04
7.0.50.0070.07017.87
7.0.40.0030.04320.02
7.0.30.0300.07320.17
7.0.20.0200.06020.12
7.0.10.0030.07020.25
7.0.00.0100.04320.16
5.6.280.0000.07720.78
5.6.210.0000.05020.56
5.6.200.0070.04018.25
5.6.190.0130.08020.33
5.6.180.0100.06020.43
5.6.170.0270.07320.61
5.6.160.0070.03720.61
5.6.150.0170.07318.27
5.6.140.0030.04318.24
5.6.130.0130.08318.23
5.6.120.0170.06720.89
5.6.110.0030.07321.13
5.6.100.0030.08720.98
5.6.90.0030.08020.97
5.6.80.0100.06720.45
5.5.350.0230.07720.47
5.5.340.0000.04317.95
5.5.330.0100.07720.25
5.5.320.0300.08020.35
5.5.310.0500.06320.46
5.5.300.0100.07717.97
5.5.290.0070.05018.06
5.5.280.0070.05720.89
5.5.270.0170.07720.85
5.5.260.0100.08020.87
5.5.250.0130.07720.78
5.5.240.0130.07720.23
5.4.450.0200.04019.39
5.4.440.0130.04319.64
5.4.430.0030.06019.55
5.4.420.0400.03719.51
5.4.410.0200.04719.34
5.4.400.0200.04319.24
5.4.390.0200.04019.00
5.4.380.0270.05318.57
5.4.370.0500.05718.76
5.4.360.0400.05018.72
5.4.350.0370.05718.76
5.4.340.0470.04018.74
5.4.320.0050.04912.50
5.4.310.0090.04512.50
5.4.300.0080.03412.51
5.4.290.0070.03712.50
5.4.280.0070.03412.40
5.4.270.0050.03612.40
5.4.260.0040.03912.40
5.4.250.0050.03812.40
5.4.240.0070.03412.40
5.4.230.0040.03912.39
5.4.220.0040.04612.39
5.4.210.0040.04112.39
5.4.200.0070.03612.39
5.4.190.0040.03812.39
5.4.180.0040.03912.39
5.4.170.0050.03712.39
5.4.160.0090.03512.39
5.4.150.0050.03712.39
5.4.140.0050.03812.07
5.4.130.0070.03412.06
5.4.120.0050.03612.02
5.4.110.0050.03612.01
5.4.100.0050.03612.01
5.4.90.0050.03812.01
5.4.80.0080.03512.01
5.4.70.0030.03912.00
5.4.60.0100.03112.01
5.4.50.0100.03612.01
5.4.40.0060.03712.00
5.4.30.0060.03611.99
5.4.20.0070.03511.99
5.4.10.0070.03811.99
5.4.00.0030.03911.48
5.3.290.0070.03812.80
5.3.280.0070.03612.71
5.3.270.0070.03712.72
5.3.260.0050.03912.72
5.3.250.0050.03812.72
5.3.240.0060.03712.71
5.3.230.0070.03712.71
5.3.220.0060.03612.68
5.3.210.0060.03912.68
5.3.200.0060.03612.68
5.3.190.0100.03412.68
5.3.180.0050.03812.67
5.3.170.0070.03612.67
5.3.160.0060.03612.67
5.3.150.0020.04012.68
5.3.140.0070.03512.66
5.3.130.0080.03612.66
5.3.120.0040.04012.66
5.3.110.0080.03612.66
5.3.100.0060.03712.12
5.3.90.0090.04312.10
5.3.80.0070.03712.09
5.3.70.0040.03712.09
5.3.60.0030.03912.07
5.3.50.0030.03812.02
5.3.40.0070.03412.02
5.3.30.0050.03511.98
5.3.20.0100.03011.76
5.3.10.0030.03811.73
5.3.00.0070.03611.72
5.2.170.0030.0319.22
5.2.160.0060.0289.21
5.2.150.0040.0319.22
5.2.140.0040.0309.21
5.2.130.0040.0299.17
5.2.120.0040.0299.17
5.2.110.0040.0309.18
5.2.100.0040.0299.17
5.2.90.0040.0299.18
5.2.80.0020.0389.17
5.2.70.0060.0329.17
5.2.60.0080.0279.13
5.2.50.0060.0299.10
5.2.40.0020.0319.07
5.2.30.0050.0309.05
5.2.20.0050.0299.04
5.2.10.0030.0308.94
5.2.00.0070.0348.80
5.1.60.0010.0308.09
5.1.50.0060.0228.08
5.1.40.0030.0268.06
5.1.30.0040.0268.41
5.1.20.0060.0258.43
5.1.10.0040.0318.16
5.1.00.0050.0258.16
5.0.50.0040.0236.63
5.0.40.0030.0206.50
5.0.30.0050.0316.31
5.0.20.0050.0236.28
5.0.10.0030.0206.26
5.0.00.0030.0316.25
4.4.90.0040.0144.77
4.4.80.0020.0164.75
4.4.70.0030.0154.75
4.4.60.0020.0164.76
4.4.50.0020.0164.77
4.4.40.0030.0244.71
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0040.0144.85
4.4.00.0040.0244.76
4.3.110.0020.0164.67
4.3.100.0010.0224.67
4.3.90.0020.0154.64
4.3.80.0030.0244.58
4.3.70.0030.0154.63
4.3.60.0070.0104.63
4.3.50.0040.0184.63
4.3.40.0030.0274.54
4.3.30.0030.0153.30
4.3.20.0010.0173.27
4.3.10.0010.0173.24
4.3.00.0000.02015.66

preferences:
61.23 ms | 401 KiB | 5 Q