3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tpnb = 5; test(); die(); function test() { global $tpnb; var_dump($tpnb); $xmlStruct = <<<EOF <?xml version="1.0" encoding="UTF-8"?> <templates> <object type="obj_1" label="Label for object 1"></object> <object type="obj_2" label="Label for object 2"></object> <object type="obj_3" label="Label for object 3"></object> <object type="obj_4" label="Label for object 4"></object> <object type="obj_5" label="Label for object 5"></object> <object type="obj_6" label="Label for object 6"></object> <object type="obj_7" label="Label for object 7"></object> <object type="obj_8" label="Label for object 8"></object> <object type="obj_9" label="Label for object 9"></object> <object type="obj_10" label="Label for object 10"></object> </templates> EOF; $tplxml = simplexml_load_string($xmlStruct); var_dump($tplxml->object[$tpnb]); var_dump($tplxml->object[(int) $tpnb]); var_dump($tplxml->object[($tpnb + 1 - 1)]); $tpnbx = $tpnb; unset($tpnb); $tpnb = $tpnbx; var_dump($tplxml->object[$tpnb]); }

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.40.0150.00019.04
8.3.30.0090.00618.94
8.3.20.0080.00020.43
8.3.10.0000.00823.78
8.3.00.0080.00019.63
8.2.170.0090.00918.95
8.2.160.0140.00419.72
8.2.150.0130.00624.18
8.2.140.0020.00524.66
8.2.130.0040.00426.16
8.2.120.0060.00321.19
8.2.110.0000.01022.45
8.2.100.0120.00018.16
8.2.90.0000.00818.09
8.2.80.0050.00518.18
8.2.70.0060.00317.88
8.2.60.0080.00018.29
8.2.50.0100.00018.10
8.2.40.0040.00422.43
8.2.30.0070.00019.50
8.2.20.0040.00417.94
8.2.10.0000.00818.30
8.2.00.0070.00018.23
8.1.270.0040.00424.66
8.1.260.0000.00926.35
8.1.250.0000.00828.09
8.1.240.0060.00322.73
8.1.230.0060.00621.20
8.1.220.0030.00517.74
8.1.210.0070.00319.01
8.1.200.0040.00717.48
8.1.190.0000.00817.48
8.1.180.0060.00318.10
8.1.170.0090.00018.71
8.1.160.0000.00722.35
8.1.150.0050.00320.72
8.1.140.0090.00019.74
8.1.130.0050.00217.61
8.1.120.0000.00717.57
8.1.110.0000.00817.64
8.1.100.0000.00817.63
8.1.90.0040.00417.54
8.1.80.0040.00417.63
8.1.70.0000.00717.54
8.1.60.0090.00017.89
8.1.50.0040.00417.84
8.1.40.0060.00317.63
8.1.30.0000.00817.93
8.1.20.0040.00417.84
8.1.10.0050.00317.85
8.1.00.0050.00317.62
8.0.300.0040.00420.07
8.0.290.0080.00016.72
8.0.280.0000.00718.55
8.0.270.0040.00317.41
8.0.260.0000.00616.94
8.0.250.0000.00717.25
8.0.240.0060.00317.21
8.0.230.0040.00417.26
8.0.220.0000.00717.18
8.0.210.0040.00417.13
8.0.200.0040.00417.23
8.0.190.0040.00417.23
8.0.180.0040.00417.20
8.0.170.0040.00417.21
8.0.160.0000.00817.03
8.0.150.0030.00517.10
8.0.140.0000.00716.98
8.0.130.0030.00313.61
8.0.120.0000.00817.11
8.0.110.0000.00816.90
8.0.100.0050.00217.08
8.0.90.0000.00716.97
8.0.80.0120.00317.06
8.0.70.0070.00017.17
8.0.60.0000.00817.15
8.0.50.0020.00517.06
8.0.30.0060.01217.46
8.0.20.0110.00817.48
8.0.10.0000.00817.06
8.0.00.0030.01516.91
7.4.330.0050.00015.27
7.4.320.0060.00016.83
7.4.300.0000.00616.57
7.4.290.0070.00016.88
7.4.280.0060.00316.69
7.4.270.0030.00316.66
7.4.260.0040.00416.80
7.4.250.0030.00316.92
7.4.240.0060.00216.78
7.4.230.0040.00316.83
7.4.220.0100.01316.82
7.4.210.0060.00916.92
7.4.200.0070.00016.77
7.4.160.0130.00516.65
7.4.150.0060.01317.40
7.4.140.0120.00717.86
7.4.130.0160.00716.88
7.4.120.0130.00816.76
7.4.110.0080.01716.77
7.4.100.0130.00316.86
7.4.90.0100.01016.82
7.4.80.0150.00919.39
7.4.70.0060.01216.65
7.4.60.0090.00916.59
7.4.50.0030.01016.64
7.4.40.0000.01816.83
7.4.30.0140.00716.69
7.4.10.0070.01416.83
7.4.00.0070.01215.63
7.3.330.0030.00313.44
7.3.320.0030.00313.67
7.3.310.0000.00816.72
7.3.300.0060.00016.65
7.3.290.0080.00716.64
7.3.280.0080.00816.64
7.3.270.0150.00417.40
7.3.260.0140.00716.83
7.3.250.0080.00916.61
7.3.240.0110.01416.71
7.3.230.0160.00016.87
7.3.210.0110.00816.84
7.3.200.0040.01316.89
7.3.190.0090.01216.82
7.3.180.0190.00716.87
7.3.170.0120.00616.71
7.3.160.0070.01616.65
7.3.130.0120.00916.60
7.3.120.0050.01315.73
7.3.110.0060.00915.89
7.3.100.0060.00715.94
7.3.90.0050.01015.78
7.3.80.0090.00615.76
7.3.70.0060.00715.88
7.3.60.0100.00315.67
7.3.50.0080.00315.90
7.3.40.0020.01115.74
7.3.30.0080.00315.80
7.3.20.0050.01017.72
7.3.10.0070.00717.69
7.3.00.0020.00617.61
7.2.330.0080.01617.00
7.2.320.0040.01416.98
7.2.310.0030.01516.83
7.2.300.0100.01017.04
7.2.290.0060.01216.61
7.2.260.0130.00716.60
7.2.250.0100.00816.09
7.2.240.0030.01415.87
7.2.230.0100.00716.15
7.2.220.0080.00415.83
7.2.210.0110.00515.76
7.2.200.0100.00416.00
7.2.190.0030.01215.95
7.2.180.0070.00815.85
7.2.170.0050.00815.94
7.2.160.0090.00616.78
7.2.150.0070.00918.59
7.2.140.0000.01418.66
7.2.130.0070.00718.74
7.2.120.0030.01018.74
7.2.110.0030.01418.59
7.2.100.0080.00718.84
7.2.90.0040.01418.74
7.2.80.0030.01318.72
7.2.70.0030.01018.66
7.2.60.0080.00817.85
7.2.50.0070.01018.61
7.2.40.0070.00318.57
7.2.30.0070.01018.66
7.2.20.0100.00318.75
7.2.10.0070.00718.54
7.2.00.0110.01118.59
7.1.330.0090.00616.76
7.1.320.0090.00416.80
7.1.310.0020.01016.68
7.1.300.0050.00816.82
7.1.290.0070.00816.87
7.1.280.0070.00916.69
7.1.270.0040.00716.79
7.1.260.0100.00416.85
7.1.250.0090.00917.45
7.1.240.0060.01317.70
7.1.230.0000.01517.46
7.1.220.0130.00017.51
7.1.210.0040.00817.48
7.1.200.0050.00716.67
7.1.190.0100.00017.54
7.1.180.0060.01017.63
7.1.170.0120.00417.58
7.1.160.0000.01117.44
7.1.150.0090.00617.66
7.1.140.0100.00617.48
7.1.130.0040.01217.49
7.1.120.0090.00617.50
7.1.110.0370.00516.87
7.1.100.0280.00816.98
7.1.90.0240.00517.13
7.1.80.0360.00816.84
7.1.70.0080.00716.72
7.1.60.0380.01223.44
7.1.50.0250.01122.62
7.1.40.0430.00425.11
7.1.30.0330.01425.25
7.1.20.0370.00825.08
7.1.10.0370.00416.21
7.1.00.0220.03018.34
7.0.330.0100.00717.50
7.0.320.0040.01117.41
7.0.310.0060.00317.36
7.0.300.0030.01017.27
7.0.290.0030.01017.32
7.0.280.0070.00717.07
7.0.270.0110.00417.27
7.0.260.0030.01217.27
7.0.250.0250.00916.71
7.0.240.0170.01116.62
7.0.230.0230.01016.67
7.0.220.0390.00716.71
7.0.210.0170.00816.00
7.0.200.0310.00715.70
7.0.190.0290.00716.03
7.0.180.0400.00716.03
7.0.170.0350.01115.92
7.0.160.0230.01315.95
7.0.150.0400.01215.86
7.0.140.0350.00616.03
7.0.130.0350.01216.04
7.0.120.0390.01115.95
7.0.110.0310.01516.02
7.0.100.0440.03217.34
7.0.90.0340.03417.27
7.0.80.0410.02517.41
7.0.70.0750.03417.30
7.0.60.0320.03417.24
7.0.50.0280.03417.41
7.0.40.0230.02416.69
7.0.30.0240.02416.64
7.0.20.0170.03116.67
7.0.10.0220.03316.64
7.0.00.0230.03116.72
5.6.400.0040.00716.27
5.6.390.0070.00716.23
5.6.380.0080.00815.80
5.6.370.0070.00716.49
5.6.360.0000.01116.38
5.6.350.0030.01016.10
5.6.340.0030.01316.20
5.6.330.0000.00916.07
5.6.320.0030.01116.13
5.6.310.0090.00615.91
5.6.300.0140.05118.52
5.6.290.0170.03418.49
5.6.280.0060.05518.38
5.6.270.0240.03718.62
5.6.260.0200.04318.65
5.6.250.0100.05819.13
5.6.240.0140.05619.34
5.6.230.0160.04119.28
5.6.220.0130.04919.25
5.6.210.0200.05019.12
5.6.200.0110.04718.08
5.6.190.0130.05019.43
5.6.180.0100.05419.32
5.6.170.0090.05419.41
5.6.160.0120.05119.30
5.6.150.0100.05319.34
5.6.140.0140.04719.45
5.6.130.0190.05219.20
5.6.120.0150.04919.37
5.6.110.0090.05419.31
5.6.100.0120.05619.38
5.6.90.0120.05019.21
5.6.80.0130.05218.98
5.6.70.0190.03718.81
5.6.60.0080.05018.97
5.6.50.0170.04618.95
5.6.40.0110.05018.92
5.6.30.0120.04818.96
5.6.20.0130.04718.92
5.6.10.0150.04218.92
5.6.00.0120.05018.81
5.5.380.0130.06719.12
5.5.370.0140.06017.50
5.5.360.0200.05717.55
5.5.350.0190.06417.56
5.5.340.0130.05617.88
5.5.330.0100.07418.18
5.5.320.0140.05318.11
5.5.310.0090.07818.11
5.5.300.0100.05618.09
5.5.290.0110.05718.02
5.5.280.0100.06218.17
5.5.270.0200.05618.01
5.5.260.0070.06218.10
5.5.250.0070.05917.66
5.5.240.0070.08017.50
5.5.230.0100.05517.57
5.5.220.0100.05717.55
5.5.210.0120.04917.23
5.5.200.0170.04717.55
5.5.190.0210.06117.23
5.5.180.0130.04917.45
5.5.160.0130.04817.45
5.5.150.0140.06217.52
5.5.140.0100.05317.45
5.5.130.0070.07817.52
5.5.120.0150.04917.41
5.5.110.0140.05217.22
5.5.100.0130.05417.36
5.5.90.0000.07217.36
5.5.80.0060.06017.40
5.5.70.0070.06717.12
5.5.60.0090.07317.26
5.5.50.0160.04617.43
5.5.40.0160.04617.43
5.5.30.0130.06717.41
5.5.20.0130.05317.35
5.5.10.0130.05117.26
5.5.00.0060.05517.41
5.4.450.0110.06719.32
5.4.440.0100.06319.46
5.4.430.0260.04219.35
5.4.420.0100.06919.39
5.4.410.0090.06519.41
5.4.400.0030.06119.22
5.4.390.0030.06619.31
5.4.380.0130.05119.22
5.4.370.0180.04419.02
5.4.360.0190.04819.00
5.4.350.0100.05419.11
5.4.340.0110.05319.22
5.4.320.0100.06419.26
5.4.310.0100.05219.22
5.4.300.0080.05418.98
5.4.290.0060.06018.99
5.4.280.0070.05719.13
5.4.270.0200.04618.99
5.4.260.0150.04619.21
5.4.250.0100.05519.21
5.4.240.0250.04419.21
5.4.230.0120.07219.05
5.4.220.0120.05819.30
5.4.210.0280.04019.31
5.4.200.0120.05219.20
5.4.190.0130.05218.98
5.4.180.0110.05319.20
5.4.170.0100.05018.99
5.4.160.0140.04718.96
5.4.150.0140.04819.29
5.4.140.0100.04916.79
5.4.130.0040.05316.59
5.4.120.0040.05316.59
5.4.110.0030.05616.89
5.4.100.0070.06116.79
5.4.90.0030.05516.86
5.4.80.0030.05516.80
5.4.70.0200.06116.69
5.4.60.0090.07016.75
5.4.50.0100.05316.77
5.4.40.0230.03916.81
5.4.30.0190.04316.53
5.4.20.0230.04616.65
5.4.10.0090.05216.77
5.4.00.0200.04016.27
5.3.290.0070.07614.86
5.3.280.0130.06614.87
5.3.270.0060.08014.97
5.3.260.0200.05214.91
5.3.250.0130.04714.74
5.3.240.0140.04514.87
5.3.230.0130.04614.86
5.3.220.0130.05214.76
5.3.210.0000.06314.82
5.3.200.0130.05814.70
5.3.190.0100.05214.87
5.3.180.0130.07114.75
5.3.170.0060.07914.83
5.3.160.0100.05614.60
5.3.150.0160.04814.75
5.3.140.0070.05914.87
5.3.130.0160.04914.71
5.3.120.0170.04714.86
5.3.110.0100.05214.85
5.3.100.0030.05614.40
5.3.90.0090.05014.33
5.3.80.0230.04314.21
5.3.70.0070.05814.36
5.3.60.0110.05114.02
5.3.50.0060.05114.14
5.3.40.0120.05814.30
5.3.30.0060.05514.18
5.3.20.0130.05413.96
5.3.10.0170.06214.01
5.3.00.0130.05113.75
5.2.170.0100.03911.33
5.2.160.0150.03811.46
5.2.150.0070.06111.44
5.2.140.0070.04711.43
5.2.130.0130.05411.38
5.2.120.0190.04711.39
5.2.110.0100.05311.41
5.2.100.0100.03811.39
5.2.90.0140.03811.29
5.2.80.0110.03911.45
5.2.70.0110.03911.27
5.2.60.0100.03911.41
5.2.50.0070.04311.32
5.2.40.0100.03811.17
5.2.30.0100.05111.12
5.2.20.0060.04111.33
5.2.10.0190.03311.03
5.2.00.0030.06211.05
5.1.60.0130.04310.35
5.1.50.0060.04810.42
5.1.40.0100.03210.32
5.1.30.0030.04210.71
5.1.20.0100.03410.63
5.1.10.0160.04110.32
5.1.00.0130.04110.53
5.0.50.0160.0198.76
5.0.40.0070.0268.85
5.0.30.0030.0558.67
5.0.20.0030.0308.62
5.0.10.0070.0278.62
5.0.00.0070.0408.62
4.4.90.0000.0308.62
4.4.80.0090.0188.62
4.4.70.0030.0238.62
4.4.60.0030.0238.62
4.4.50.0000.0258.62
4.4.40.0130.0338.62
4.4.30.0030.0238.62
4.4.20.0030.0238.62
4.4.10.0070.0268.62
4.4.00.0030.0358.62
4.3.110.0090.0198.62
4.3.100.0030.0238.62
4.3.90.0030.0238.62
4.3.80.0000.0368.62
4.3.70.0030.0218.62
4.3.60.0060.0198.62
4.3.50.0100.0168.62
4.3.40.0030.0338.62
4.3.30.0040.0218.62
4.3.20.0060.0188.62
4.3.10.0030.0218.62
4.3.00.0090.0158.62

preferences:
55.49 ms | 400 KiB | 5 Q