3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'fruits' => [ 'apple' => 'value', 'orange' => 'value' ], 'vegetables' => [ 'onion' => 'value', 'carrot' => 'value' ]); $string = 'fruits[orange]'; $indexes = (preg_split( "/(\[|\])/", $string)); $first_index= $indexes[0]; $seconnd_index= $indexes[1]; if(isset($array[$first_index][$seconnd_index])) { echo "exist"; } else { echo "not exist"; }

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.4.20.0060.00318.09
8.4.10.0060.00319.79
8.3.150.0100.01018.89
8.3.140.0080.00016.81
8.3.130.0050.00318.30
8.3.120.0000.00920.52
8.3.110.0060.00320.94
8.3.100.0040.00418.71
8.3.90.0170.00326.77
8.3.80.0080.00316.38
8.3.70.0180.00416.71
8.3.60.0090.00916.75
8.3.50.0050.01318.32
8.3.40.0040.01119.14
8.3.30.0040.01118.99
8.3.20.0000.00820.20
8.3.10.0070.00022.15
8.3.00.0040.00423.64
8.2.260.0040.00416.74
8.2.250.0040.00416.82
8.2.240.0070.00317.16
8.2.230.0100.00022.58
8.2.220.0030.00624.06
8.2.210.0040.00426.77
8.2.200.0030.00616.75
8.2.190.0070.01016.75
8.2.180.0120.00325.92
8.2.170.0160.00619.16
8.2.160.0070.01322.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0070.00019.30
8.2.120.0000.00826.35
8.2.110.0060.01319.05
8.2.100.0120.00017.97
8.2.90.0000.00919.41
8.2.80.0040.00417.97
8.2.70.0150.00217.38
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0070.00018.16
8.2.30.0040.00418.09
8.2.20.0030.00518.05
8.2.10.0050.00218.20
8.2.00.0070.00018.02
8.1.310.0040.00418.74
8.1.300.0030.00618.22
8.1.290.0090.00330.84
8.1.280.0110.01125.92
8.1.270.0030.00522.10
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.00822.66
8.1.230.0070.00422.74
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0110.00017.36
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0000.00818.86
8.1.150.0040.00420.11
8.1.140.0000.00719.50
8.1.130.0030.00520.75
8.1.120.0020.00517.60
8.1.110.0040.00417.50
8.1.100.0050.00317.43
8.1.90.0000.00717.57
8.1.80.0040.00417.61
8.1.70.0070.00017.55
8.1.60.0050.00217.63
8.1.50.0030.00717.67
8.1.40.0000.00717.52
8.1.30.0000.00817.69
8.1.20.0000.00917.80
8.1.10.0050.00317.80
8.1.00.0030.00517.57
8.0.300.0000.00718.77
8.0.290.0090.00017.00
8.0.280.0050.00318.44
8.0.270.0000.00717.29
8.0.260.0040.00418.63
8.0.250.0070.00017.06
8.0.240.0040.00417.01
8.0.230.0000.00717.06
8.0.220.0070.00016.88
8.0.210.0000.00716.95
8.0.200.0030.00317.00
8.0.190.0040.00417.03
8.0.180.0000.00716.94
8.0.170.0000.00716.89
8.0.160.0040.00417.02
8.0.150.0000.00816.94
8.0.140.0040.00416.93
8.0.130.0050.00013.47
8.0.120.0080.00016.91
8.0.110.0000.00717.02
8.0.100.0040.00417.02
8.0.90.0050.00317.05
8.0.80.0100.01017.02
8.0.70.0030.00516.85
8.0.60.0040.00417.02
8.0.50.0040.00416.83
8.0.30.0110.00717.40
8.0.20.0070.01317.45
8.0.10.0070.00016.96
8.0.00.0120.01217.12
7.4.330.0000.00515.55
7.4.320.0060.00016.70
7.4.300.0020.00516.56
7.4.290.0030.00316.60
7.4.280.0050.00316.73
7.4.270.0030.00316.76
7.4.260.0070.00016.77
7.4.250.0050.00316.69
7.4.240.0000.00716.68
7.4.230.0030.00516.87
7.4.220.0030.01516.59
7.4.210.0070.01416.73
7.4.200.0070.00016.69
7.4.160.0100.00716.62
7.4.150.0130.00317.40
7.4.140.0100.00817.86
7.4.130.0070.01116.69
7.4.120.0080.01216.75
7.4.110.0110.00616.79
7.4.100.0100.00716.63
7.4.90.0070.01116.76
7.4.80.0100.01019.39
7.4.70.0100.01416.58
7.4.60.0070.01016.78
7.4.50.0150.00016.50
7.4.40.0000.01716.73
7.4.30.0090.00916.59
7.4.10.0070.01315.02
7.4.00.0080.00915.05
7.3.330.0020.00213.21
7.3.320.0030.00313.31
7.3.310.0000.00716.25
7.3.300.0040.00416.28
7.3.290.0100.00816.48
7.3.280.0090.00816.51
7.3.270.0120.00617.40
7.3.260.0090.00816.51
7.3.250.0120.00616.48
7.3.240.0070.00916.61
7.3.230.0100.00716.38
7.3.210.0100.00716.59
7.3.200.0080.00816.73
7.3.190.0090.00916.73
7.3.180.0060.01016.82
7.3.170.0060.00916.39
7.3.160.0130.00316.33
7.3.130.0030.01315.04
7.3.120.0030.01214.95
7.3.110.0060.01014.82
7.3.100.0030.01015.17
7.3.90.0080.00814.67
7.3.80.0040.01114.68
7.3.70.0080.00415.00
7.3.60.0080.00415.02
7.3.50.0070.00715.00
7.3.40.0030.00614.91
7.3.30.0090.00615.04
7.3.20.0070.00716.73
7.3.10.0050.00816.65
7.3.00.0080.00516.83
7.2.330.0030.01516.95
7.2.320.0110.00816.71
7.2.310.0060.01316.72
7.2.300.0110.00716.71
7.2.290.0070.01016.81
7.2.260.0140.00715.18
7.2.250.0130.00714.90
7.2.240.0080.00615.04
7.2.230.0030.01215.20
7.2.220.0000.01214.73
7.2.210.0090.00614.87
7.2.200.0000.01315.10
7.2.190.0120.00315.32
7.2.180.0070.01115.13
7.2.170.0040.01215.11
7.2.160.0140.00315.16
7.2.150.0040.00816.87
7.2.140.0110.00417.14
7.2.130.0080.00817.01
7.2.120.0050.00716.97
7.2.110.0060.00816.89
7.2.100.0040.00917.07
7.2.90.0080.00817.12
7.2.80.0050.00717.13
7.2.70.0010.01217.08
7.2.60.0080.00717.11
7.2.50.0090.00817.07
7.2.40.0060.00917.05
7.2.30.0050.00817.26
7.2.20.0060.00817.15
7.2.10.0080.00617.02
7.2.00.0070.00717.11
7.1.330.0080.00815.90
7.1.320.0070.00416.05
7.1.310.0100.00316.09
7.1.300.0100.00315.95
7.1.290.0000.01215.87
7.1.280.0030.00615.88
7.1.270.0040.01416.18
7.1.260.0060.00616.05
7.1.250.0050.00915.94
7.1.240.0050.01016.02
7.1.230.0050.00716.02
7.1.220.0030.00815.94
7.1.210.0020.01216.13
7.1.200.0060.00715.72
7.1.190.0060.00916.03
7.1.180.0050.00716.09
7.1.170.0030.01016.13
7.1.160.0030.01015.90
7.1.150.0110.00416.11
7.1.140.0030.01016.11
7.1.130.0060.00615.79
7.1.120.0070.00715.92
7.1.110.0060.00615.98
7.1.100.0070.00515.93
7.1.90.0260.00917.39
7.1.80.0140.00917.02
7.1.70.0170.01016.53
7.1.60.0360.00827.23
7.1.50.0230.01027.00
7.1.40.0140.00827.24
7.1.30.0220.00926.87
7.1.20.0120.01127.30
7.1.10.0050.00816.36
7.1.00.0040.00916.64
7.0.330.0080.00515.56
7.0.320.0020.00815.55
7.0.310.0080.00715.51
7.0.300.0050.00615.66
7.0.290.0060.00715.54
7.0.280.0070.00515.54
7.0.270.0020.01215.44
7.0.260.0060.00615.42
7.0.250.0050.00715.69
7.0.240.0060.00515.43
7.0.230.0090.00516.98
7.0.220.0080.00617.22
7.0.210.0210.00515.84
7.0.200.0180.00816.08
7.0.190.0200.00616.02
7.0.180.0160.00915.73
7.0.170.0070.00616.00
7.0.160.0150.00716.10
7.0.150.0170.00316.13
7.0.140.0060.00916.06
7.0.130.0060.00616.20
7.0.120.0070.00516.27
7.0.110.0070.00716.22
7.0.100.0050.01016.02
7.0.90.0060.00616.09
7.0.80.0030.01016.02
7.0.70.0030.01016.16
7.0.60.0050.00615.94
7.0.50.0310.00615.78
7.0.40.0190.00715.37
7.0.30.0040.00715.40
7.0.20.0070.00515.40
7.0.10.0060.00715.32
7.0.00.0070.00515.45
5.6.400.0090.00614.36
5.6.390.0000.01414.57
5.6.380.0070.00814.32
5.6.370.0070.00714.57
5.6.360.0050.00714.54
5.6.350.0030.01114.43
5.6.340.0030.00914.37
5.6.330.0090.00514.38
5.6.320.0040.00814.61
5.6.310.0070.00714.20
5.6.300.0090.03718.25
5.6.290.0070.04018.35
5.6.280.0070.03918.23
5.6.270.0070.03718.30
5.6.260.0120.03318.38
5.6.250.0080.03718.21
5.6.240.0130.03318.22
5.6.230.0080.04018.19
5.6.220.0060.04118.27
5.6.210.0050.03718.26
5.6.200.0100.03518.37
5.6.190.0120.03518.32
5.6.180.0090.03318.26
5.6.170.0080.03518.27
5.6.160.0080.03518.39
5.6.150.0080.03518.32
5.6.140.0080.03818.22
5.6.130.0070.03618.32
5.6.120.0090.03518.22
5.6.110.0060.03918.19
5.6.100.0040.04018.29
5.6.90.0090.03518.30
5.6.80.0090.03117.85
5.6.70.0070.03517.94
5.6.60.0070.03417.78
5.6.50.0100.03217.89
5.6.40.0050.03917.83
5.6.30.0080.03517.84
5.6.20.0050.03717.95
5.6.10.0100.03517.76
5.6.00.0060.03717.82
5.5.380.0080.02614.26
5.5.370.0010.03214.23
5.5.360.0050.03314.20
5.5.350.0050.02814.41
5.5.340.0050.02914.36
5.5.330.0060.02814.63
5.5.320.0100.02514.50
5.5.310.0100.02614.61
5.5.300.0120.02214.52
5.5.290.0060.03214.63
5.5.280.0050.03214.54
5.5.270.0080.02814.50
5.5.260.0080.02914.46
5.5.250.0040.03214.36
5.5.240.0020.03114.21
5.5.230.0080.02914.26
5.5.220.0020.03214.21
5.5.210.0000.03414.01
5.5.200.0030.03114.11
5.5.190.0050.03114.27
5.5.180.0060.03014.16
5.5.170.0030.00311.16
5.5.160.0050.03114.28
5.5.150.0070.02814.20
5.5.140.0030.03214.24
5.5.130.0110.02514.22
5.5.120.0070.02814.34
5.5.110.0080.02814.13
5.5.100.0080.02814.22
5.5.90.0060.02714.16
5.5.80.0050.02914.16
5.5.70.0060.02913.97
5.5.60.0060.02514.16
5.5.50.0060.03214.20
5.5.40.0070.02614.12
5.5.30.0030.03314.20
5.5.20.0100.02814.15
5.5.10.0100.02514.11
5.5.00.0000.03514.18
5.4.450.0050.03315.32
5.4.440.0120.02615.19
5.4.430.0090.02615.31
5.4.420.0060.03015.11
5.4.410.0100.02415.03
5.4.400.0050.02814.92
5.4.390.0100.02614.72
5.4.380.0050.02815.12
5.4.370.0110.02114.98
5.4.360.0050.02914.95
5.4.350.0050.02914.88
5.4.340.0030.03115.06
5.4.330.0070.00310.90
5.4.320.0060.02914.96
5.4.310.0070.02615.08
5.4.300.0080.02815.05
5.4.290.0080.02715.03
5.4.280.0060.03114.93
5.4.270.0120.02114.96
5.4.260.0020.03115.16
5.4.250.0030.03715.12
5.4.240.0020.03114.87
5.4.230.0070.02514.96
5.4.220.0040.02914.91
5.4.210.0100.02214.79
5.4.200.0080.02815.04
5.4.190.0030.03115.05
5.4.180.0090.02514.87
5.4.170.0100.02314.86
5.4.160.0100.02614.92
5.4.150.0080.02514.84
5.4.140.0060.02513.54
5.4.130.0030.02913.83
5.4.120.0070.02513.64
5.4.110.0030.02913.83
5.4.100.0110.02313.75
5.4.90.0050.02513.54
5.4.80.0090.02113.72
5.4.70.0060.02713.68
5.4.60.0070.02313.75
5.4.50.0060.02813.69
5.4.40.0020.03213.81
5.4.30.0080.02413.73
5.4.20.0030.03013.82
5.4.10.0050.02913.71
5.4.00.0060.02613.32
5.3.290.0030.03012.39
5.3.280.0100.02312.38
5.3.270.0020.03312.47
5.3.260.0070.03012.49
5.3.250.0100.02512.47
5.3.240.0080.02512.35
5.3.230.0110.02412.38
5.3.220.0100.02312.36
5.3.210.0020.03212.36
5.3.200.0090.02512.40
5.3.190.0030.03112.43
5.3.180.0050.02812.55
5.3.170.0060.02712.49
5.3.160.0080.02612.49
5.3.150.0050.02712.51
5.3.140.0060.02512.42
5.3.130.0050.02812.47
5.3.120.0080.02412.43
5.3.110.0020.03212.51
5.3.100.0070.02412.12
5.3.90.0090.02412.06
5.3.80.0080.02312.12
5.3.70.0030.02912.17
5.3.60.0000.03112.12
5.3.50.0060.02612.11
5.3.40.0110.02412.14
5.3.30.0070.02711.89
5.3.20.0050.02711.90
5.3.10.0030.02911.75
5.3.00.0030.03611.79
5.2.170.0070.02010.32
5.2.160.0040.02310.21
5.2.150.0090.02510.32
5.2.140.0030.02210.24
5.2.130.0060.02110.22
5.2.120.0050.02410.23
5.2.110.0030.02210.33
5.2.100.0030.03110.28
5.2.90.0020.03210.13
5.2.80.0050.02910.34
5.2.70.0030.02810.21
5.2.60.0110.02310.19
5.2.50.0080.02310.15
5.2.40.0100.02610.29
5.2.30.0070.01810.22
5.2.20.0000.02710.12
5.2.10.0040.02210.24
5.2.00.0020.02210.06
5.1.60.0000.0219.61
5.1.50.0060.0169.75
5.1.40.0030.0229.65
5.1.30.0030.0219.78
5.1.20.0030.0229.95
5.1.10.0060.0179.77
5.1.00.0010.0239.85
5.0.50.0050.0198.96
5.0.40.0060.0119.04
5.0.30.0000.0278.88
5.0.20.0060.0158.76
5.0.10.0050.0158.85
5.0.00.0050.0238.81
4.4.90.0030.0168.23
4.4.80.0060.0138.23
4.4.70.0020.0128.23
4.4.60.0020.0128.23
4.4.50.0020.0148.23
4.4.40.0020.0208.23
4.4.30.0020.0148.23
4.4.20.0030.0178.23
4.4.10.0000.0158.23
4.4.00.0030.0198.23
4.3.110.0040.0108.23
4.3.100.0050.0128.23
4.3.90.0050.0108.23
4.3.80.0020.0208.23
4.3.70.0030.0108.23
4.3.60.0040.0108.23
4.3.50.0050.0118.23
4.3.40.0000.0218.23
4.3.30.0040.0108.23
4.3.20.0030.0118.23
4.3.10.0040.0108.23
4.3.00.0020.0118.23

preferences:
76.65 ms | 403 KiB | 5 Q