3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '<?xml version="1.0" encoding="utf-8" ?> <note> <to> <form>heslo0</form> <heading>A</heading> <body>C</body> </to> <to> <form>heslo1</form> <heading>A</heading> <body>F</body> </to> </note>'; $xml = simplexml_load_string($data); foreach ($xml->to as $to){ if ($to->form == 'heslo0' && $to->heading == 'A'){echo "povoleno";} elseif ($to->form == 'heslo0' && $to->heading == 'B'){echo "nepovoleno";} elseif ($to->form == 'heslo0' && $to->heading == 'C'){echo "blokováno";} } // po sem se splní a vypíše "povoleno" foreach ($xml->to as $to){ if ($to->form == 'heslo2' && $to->heading == 'A'){echo "povoleno";} elseif ($to->form == 'heslo2' && $to->heading == 'B'){echo "nepovoleno";} elseif ($to->form == 'heslo2' && $to->heading == 'C'){echo "blokováno";} } // tady už neexistuje daný blok, tak bych chtěl vypsat hlášku třeba "neaktivní" ?>

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.1.130.0040.00417.95
8.1.120.0070.00017.57
8.1.110.0000.00817.56
8.1.100.0040.00417.77
8.1.90.0000.00817.63
8.1.80.0040.00417.58
8.1.70.0050.00317.64
8.1.60.0050.00217.71
8.1.50.0040.00417.77
8.1.40.0080.00317.66
8.1.30.0000.00817.87
8.1.20.0060.00317.82
8.1.10.0040.00417.63
8.1.00.0040.00417.54
8.0.260.0000.00817.41
8.0.250.0040.00417.05
8.0.240.0040.00417.13
8.0.230.0030.00317.11
8.0.220.0030.00317.05
8.0.210.0000.00817.14
8.0.200.0000.00817.14
8.0.190.0030.00517.04
8.0.180.0040.00417.13
8.0.170.0040.00417.08
8.0.160.0070.00017.21
8.0.150.0000.00716.99
8.0.140.0030.00317.07
8.0.130.0030.00313.61
8.0.120.0080.00017.11
8.0.110.0030.00517.00
8.0.100.0030.00516.92
8.0.90.0050.00217.14
8.0.80.0090.00617.05
8.0.70.0000.00716.98
8.0.60.0000.00717.09
8.0.50.0060.00317.08
8.0.30.0070.00817.37
8.0.20.0120.00917.40
8.0.10.0040.00417.08
8.0.00.0100.01317.19
7.4.330.0000.00515.36
7.4.320.0060.00016.73
7.4.300.0030.00316.71
7.4.290.0040.00416.70
7.4.280.0040.00416.83
7.4.270.0050.00216.82
7.4.260.0090.00016.79
7.4.250.0040.00416.72
7.4.240.0000.00716.85
7.4.230.0000.00716.50
7.4.220.0100.00916.76
7.4.210.0080.01416.73
7.4.200.0000.00716.54
7.4.160.0110.00616.94
7.4.150.0120.00617.40
7.4.140.0080.01217.86
7.4.130.0060.01616.65
7.4.120.0120.00516.85
7.4.110.0160.00316.76
7.4.100.0100.00716.70
7.4.90.0070.01116.78
7.4.80.0120.00619.39
7.4.70.0090.00616.74
7.4.60.0060.01016.85
7.4.50.0040.01116.66
7.4.40.0030.01316.56
7.4.30.0090.00916.89
7.4.00.0060.01214.94
7.3.330.0020.00213.26
7.3.320.0060.00013.31
7.3.310.0000.00716.26
7.3.300.0000.00616.34
7.3.290.0100.00616.42
7.3.280.0080.01016.43
7.3.270.0100.01017.40
7.3.260.0070.01016.60
7.3.250.0140.00816.47
7.3.240.0100.01016.56
7.3.230.0100.00616.39
7.3.210.0120.00916.52
7.3.200.0060.01116.80
7.3.190.0080.00816.47
7.3.180.0130.01016.61
7.3.170.0100.00616.66
7.3.160.0030.01416.64
7.3.120.0070.01014.99
7.3.110.0050.01214.98
7.3.100.0000.01315.17
7.3.90.0080.00714.97
7.3.80.0020.01014.93
7.3.70.0020.01114.84
7.3.60.0070.00714.99
7.3.50.0060.00614.91
7.3.40.0050.00614.87
7.3.30.0050.00814.84
7.3.20.0050.01016.58
7.3.10.0020.01316.62
7.3.00.0080.01016.71
7.2.330.0060.01217.02
7.2.320.0110.01416.93
7.2.310.0090.00916.73
7.2.300.0090.00916.64
7.2.290.0160.00916.59
7.2.250.0090.00815.32
7.2.240.0070.01115.06
7.2.230.0060.00715.28
7.2.220.0050.00915.22
7.2.210.0070.00815.29
7.2.200.0110.00215.29
7.2.190.0070.00615.31
7.2.180.0070.01014.93
7.2.170.0030.01315.09
7.2.130.0130.00316.71
7.2.120.0070.00717.10
7.2.110.0060.01016.77
7.2.100.0070.01116.95
7.2.90.0070.00716.99
7.2.80.0130.00316.77
7.2.70.0090.00916.75
7.2.60.0050.01217.13
7.2.50.0080.00617.03
7.2.40.0070.01016.93
7.2.30.0070.01016.74
7.2.20.0070.01016.46
7.2.10.0060.01016.83
7.2.00.0100.00716.78
7.1.330.0080.00515.84
7.1.320.0060.00715.98
7.1.310.0030.00815.65
7.1.300.0050.00815.84
7.1.290.0030.00915.95
7.1.280.0040.00815.99
7.1.270.0070.00815.83
7.1.260.0080.00815.73
7.1.250.0070.00715.63
7.1.200.0030.01015.75
7.1.70.0090.00417.31
7.1.60.0130.01319.29
7.1.00.0030.07722.41
7.0.200.0250.00314.66
7.0.100.0200.04320.02
7.0.90.0070.04720.19
7.0.80.0100.07320.01
7.0.70.0030.04320.01
7.0.60.0130.07320.11
7.0.50.0230.07320.40
7.0.40.0030.09020.10
7.0.30.0070.04320.28
7.0.20.0100.05720.07
7.0.10.0070.04720.27
7.0.00.0200.05320.11
5.6.250.0200.05720.66
5.6.240.0200.06720.69
5.6.230.0130.08320.79
5.6.220.0070.06720.69
5.6.210.0130.09020.83
5.6.200.0130.07721.26
5.6.190.0130.05721.04
5.6.180.0100.08021.13
5.6.170.0000.06721.06
5.6.160.0100.04321.14
5.6.150.0030.05021.19
5.6.140.0070.06021.06
5.6.130.0100.06020.99
5.6.120.0030.05021.06
5.6.110.0030.07321.27
5.6.100.0130.08021.07
5.6.90.0170.08020.98
5.6.80.0100.04320.48
5.6.70.0170.07020.66
5.6.60.0070.05720.43
5.6.50.0030.08020.45
5.6.40.0130.04020.48
5.6.30.0130.07020.34
5.6.20.0030.08320.51
5.6.10.0000.08320.41
5.6.00.0130.06020.49
5.5.380.0070.08320.60
5.5.370.0030.08720.46
5.5.360.0100.05020.43
5.5.350.0070.08720.48
5.5.340.0030.08721.01
5.5.330.0100.08021.01
5.5.320.0070.05020.72
5.5.310.0130.04020.99
5.5.300.0170.06320.84
5.5.290.0130.04021.02
5.5.280.0070.08720.75
5.5.270.0070.03720.91
5.5.260.0030.09020.83
5.5.250.0170.05720.70
5.5.240.0070.07720.32
5.5.230.0100.04320.38
5.5.220.0070.06720.18
5.5.210.0030.08720.13
5.5.200.0170.07020.21
5.5.190.0030.04020.16
5.5.180.0030.04320.13
5.5.160.0000.05320.38
5.5.150.0030.05020.33
5.5.140.0070.07020.34
5.5.130.0200.07320.25
5.5.120.0070.07720.32
5.5.110.0070.07720.25
5.5.100.0070.06320.13
5.5.90.0070.08020.21
5.5.80.0100.03720.21
5.5.70.0030.04720.21
5.5.60.0030.07320.21
5.5.50.0170.03720.20
5.5.40.0030.05720.24
5.5.30.0130.06320.21
5.5.20.0170.06720.04
5.5.10.0100.08720.23
5.5.00.0100.07720.09

preferences:
58.58 ms | 406 KiB | 5 Q