3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="utf-8"?> <toflag> <flagarea formulaid="1" eventid="100" sessionid="421" sectionid="180001" floorid="180001" zoneid="180001" categoryid="180001"> <flagbloc priceid="4410026">1</flagbloc> </flagarea> <flagarea formulaid="1" eventid="207" sessionid="423" sectionid="180001" floorid="180001" zoneid="180001" categoryid="180001"> <flagbloc priceid="4410026">1</flagbloc> </flagarea> <flagarea formulaid="1" eventid="94" sessionid="117" sectionid="170001" floorid="0" zoneid="170001" categoryid="170001"> <flagbloc priceid="4410026">1</flagbloc> </flagarea> <flagarea formulaid="1" eventid="120" sessionid="155" sectionid="170001" floorid="0" zoneid="170001" categoryid="170001"> <flagbloc priceid="4410026">1</flagbloc> </flagarea> </toflag> XML; $dom = new DOMDocument; $dom->loadXML($xml); $dom->formatOutput = true; $xpath = new DOMXpath($dom); $query = '/toflag/flagarea[@formulaid="1" and @eventid="207" and @sessionid="423" and @sectionid="180001" and @floorid="180001" and @zoneid="180001" and @categoryid="180001"]/flagbloc[@priceid="4410026"]'; $result = $xpath->query($query); if ($result->length) { $flagBloc = $result->item(0); var_dump($flagBloc->nodeValue); $flagBloc->nodeValue = intval($flagBloc->nodeValue, 10) + 1; } echo $dom->saveXML();

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.0080.00818.68
8.3.50.0090.00922.20
8.3.40.0040.01119.14
8.3.30.0040.01119.51
8.3.20.0040.00420.66
8.3.10.0040.00423.83
8.3.00.0000.00820.93
8.2.180.0070.00716.88
8.2.170.0120.00322.96
8.2.160.0030.01420.93
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00318.13
8.2.110.0070.00322.89
8.2.100.0090.00318.34
8.2.90.0090.00018.13
8.2.80.0030.00618.25
8.2.70.0050.00318.43
8.2.60.0080.00018.66
8.2.50.0080.00018.10
8.2.40.0040.00421.65
8.2.30.0040.00419.72
8.2.20.0040.00418.03
8.2.10.0000.00818.14
8.2.00.0040.00418.26
8.1.280.0120.00625.92
8.1.270.0040.00424.21
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00324.30
8.1.230.0080.00318.27
8.1.220.0000.00918.03
8.1.210.0050.00318.77
8.1.200.0000.01017.85
8.1.190.0120.00017.72
8.1.180.0030.00618.10
8.1.170.0030.00619.00
8.1.160.0000.00719.29
8.1.150.0000.00819.25
8.1.140.0000.00817.81
8.1.130.0000.00718.21
8.1.120.0000.00717.92
8.1.110.0000.00717.73
8.1.100.0050.00217.92
8.1.90.0040.00417.93
8.1.80.0040.00417.71
8.1.70.0030.00317.92
8.1.60.0000.00918.05
8.1.50.0000.00917.89
8.1.40.0000.00817.82
8.1.30.0030.00517.88
8.1.20.0060.00318.03
8.1.10.0040.00417.95
8.1.00.0040.00418.03
8.0.300.0000.00818.77
8.0.290.0060.00317.25
8.0.280.0030.00318.89
8.0.270.0040.00417.69
8.0.260.0030.00317.37
8.0.250.0030.00317.49
8.0.240.0030.00517.53
8.0.230.0000.00817.46
8.0.220.0080.00017.43
8.0.210.0040.00417.39
8.0.200.0000.00617.38
8.0.190.0080.00017.44
8.0.180.0040.00417.43
8.0.170.0040.00417.22
8.0.160.0070.00017.23
8.0.150.0040.00417.30
8.0.140.0000.00717.23
8.0.130.0040.00413.80
8.0.120.0050.00317.23
8.0.110.0040.00417.36
8.0.100.0000.00717.18
8.0.90.0000.00817.31
8.0.80.0060.00917.48
8.0.70.0000.00717.42
8.0.60.0040.00417.37
8.0.50.0000.00817.38
8.0.30.0100.00917.60
8.0.20.0090.00917.48
8.0.10.0030.00617.36
8.0.00.0130.01217.12
7.4.330.0060.00015.43
7.4.320.0030.00316.82
7.4.300.0040.00416.82
7.4.290.0020.00416.98
7.4.280.0070.00316.99
7.4.270.0070.00016.83
7.4.260.0030.00316.92
7.4.250.0040.00417.03
7.4.240.0020.00616.89
7.4.230.0000.00716.85
7.4.220.0090.00616.98
7.4.210.0060.01016.89
7.4.200.0040.00416.86
7.4.190.0000.00717.03
7.4.160.0080.00816.74
7.4.150.0130.00417.40
7.4.140.0120.01117.86
7.4.130.0080.01316.95
7.4.120.0100.00716.92
7.4.110.0040.01517.19
7.4.100.0150.00316.97
7.4.90.0090.00916.83
7.4.80.0130.00716.90
7.4.70.0110.00616.90
7.4.60.0140.00416.74
7.4.50.0000.00616.81
7.4.40.0030.01022.77
7.4.30.0180.00316.90
7.4.10.0060.01215.11
7.4.00.0060.01015.15
7.3.330.0000.00513.50
7.3.320.0060.00013.60
7.3.310.0000.00716.55
7.3.300.0000.00716.61
7.3.290.0070.00716.60
7.3.280.0050.01116.68
7.3.270.0100.01417.40
7.3.260.0140.01016.77
7.3.250.0120.01016.75
7.3.240.0040.01316.63
7.3.230.0150.00616.87
7.3.210.0090.00916.91
7.3.200.0060.01519.39
7.3.190.0150.00317.04
7.3.180.0090.00616.73
7.3.170.0110.00816.72
7.3.160.0030.01316.93
7.3.130.0130.00715.10
7.3.120.0120.00514.96
7.3.110.0080.01015.02
7.3.100.0050.01015.01
7.3.90.0030.01515.05
7.3.80.0040.01115.14
7.3.70.0050.00915.02
7.3.60.0050.00714.98
7.3.50.0070.00714.88
7.3.40.0050.00715.03
7.3.30.0060.00614.96
7.3.20.0070.00716.86
7.3.10.0030.01116.81
7.3.00.0060.00916.80
7.2.330.0140.00317.32
7.2.320.0090.00917.19
7.2.310.0070.01517.12
7.2.300.0110.00717.13
7.2.290.0120.01116.96
7.2.260.0070.01115.21
7.2.250.0140.00415.14
7.2.240.0050.00815.15
7.2.230.0030.01215.32
7.2.220.0080.00715.27
7.2.210.0030.01115.15
7.2.200.0090.00815.22
7.2.190.0060.00715.29
7.2.180.0040.01215.29
7.2.170.0000.01615.16
7.2.160.0060.00715.18
7.2.150.0050.00817.11
7.2.140.0030.00817.02
7.2.130.0090.00317.17
7.2.120.0060.00817.22
7.2.110.0030.01217.12
7.2.100.0030.01017.06
7.2.90.0030.01117.07
7.2.80.0050.00817.20
7.2.70.0050.00717.01
7.2.60.0020.00817.18
7.2.50.0050.00917.15
7.2.40.0090.00416.98
7.2.30.0100.00617.28
7.2.20.0030.00917.16
7.2.10.0050.01017.16
7.2.00.0080.00618.03
7.1.330.0040.00915.98
7.1.320.0040.01016.00
7.1.310.0100.00716.10
7.1.300.0090.00215.90
7.1.290.0060.00615.92
7.1.280.0100.00515.89
7.1.270.0000.01216.00
7.1.260.0070.00516.05
7.1.250.0040.01015.85
7.1.240.0090.00615.99
7.1.230.0080.00615.90
7.1.220.0000.01416.15
7.1.210.0070.00715.96
7.1.200.0030.00916.03
7.1.190.0070.00715.79
7.1.180.0070.00416.10
7.1.170.0060.00616.01
7.1.160.0000.01015.93
7.1.150.0100.00316.03
7.1.140.0030.01015.95
7.1.130.0000.00816.04
7.1.120.0030.01016.06
7.1.110.0100.00015.86
7.1.100.0020.01016.94
7.1.90.0090.00616.19
7.1.80.0000.01715.81
7.1.70.0030.00816.65
7.1.60.0070.01217.61
7.1.50.0050.01216.53
7.1.40.0040.00415.97
7.1.30.0150.00015.91
7.1.20.0000.00816.01
7.1.10.0030.01315.88
7.1.00.0030.04519.28
7.0.330.0050.00315.67
7.0.320.0000.01315.50
7.0.310.0060.00915.51
7.0.300.0030.01015.58
7.0.290.0040.00815.51
7.0.280.0030.01015.59
7.0.270.0070.00715.43
7.0.260.0000.00915.64
7.0.250.0070.00315.68
7.0.240.0070.00715.66
7.0.230.0040.00415.55
7.0.220.0040.00415.73
7.0.210.0060.00915.57
7.0.200.0000.01216.35
7.0.190.0040.00415.49
7.0.180.0090.00315.73
7.0.170.0000.01315.64
7.0.160.0000.00815.65
7.0.150.0100.00715.59
7.0.140.0050.04218.84
7.0.130.0080.00315.72
7.0.120.0060.00315.51
7.0.110.0070.01015.60
7.0.100.0000.01515.61
7.0.90.0070.00415.66
7.0.80.0070.00415.50
7.0.70.0030.00715.51
7.0.60.0810.03417.86
7.0.50.0050.04316.95
7.0.40.0030.02917.07
7.0.30.0150.02516.96
7.0.20.0130.04817.06
7.0.10.0080.03816.98
7.0.00.0050.04716.98
5.6.400.0000.01215.03
5.6.390.0060.00614.60
5.6.380.0000.00814.72
5.6.370.0000.01214.77
5.6.360.0030.00614.24
5.6.350.0070.00714.36
5.6.340.0040.00714.66
5.6.330.0000.01114.34
5.6.320.0100.00314.68
5.6.310.0000.01214.30
5.6.300.0100.00714.31
5.6.290.0070.01014.20
5.6.280.0060.03817.99
5.6.270.0000.01814.87
5.6.260.0070.00714.59
5.6.250.0030.01314.67
5.6.240.0000.01314.47
5.6.230.0060.00614.63
5.6.220.0060.01014.52
5.6.210.0650.03517.88
5.6.200.0030.04816.65
5.6.190.0070.04717.58
5.6.180.0050.02217.68
5.6.170.0210.02117.80
5.6.160.0080.02617.62
5.6.150.0020.03216.50
5.6.140.0050.02516.45
5.6.130.0060.02116.62
5.6.120.0040.03417.93
5.6.110.0030.02617.93
5.6.100.0070.03517.84
5.6.90.0070.03417.82
5.6.80.0020.02717.56
5.6.70.1800.02217.64
5.6.60.0090.00914.49
5.6.50.0000.00914.89
5.6.40.0030.00914.74
5.6.30.0070.00714.21
5.6.20.0120.00314.38
5.6.10.0000.00914.48
5.6.00.0060.00614.48
5.5.380.0030.00814.68
5.5.370.0030.01014.34
5.5.360.0080.00814.63
5.5.350.0040.04217.66
5.5.340.0090.03516.28
5.5.330.0060.04417.61
5.5.320.0090.04317.40
5.5.310.0220.03717.59
5.5.300.0040.04316.41
5.5.290.0090.02316.29
5.5.280.0070.04717.92
5.5.270.0050.02917.69
5.5.260.0110.03417.71
5.5.250.0100.03217.73
5.5.240.0080.04217.44
5.5.230.0030.01514.34
5.5.220.0090.00914.58
5.5.210.0080.00414.41
5.5.200.0030.01314.59
5.5.190.0000.01414.46
5.5.180.0030.01114.52
5.5.170.0080.00414.38
5.5.160.0090.00014.48
5.5.150.0070.00414.59
5.5.140.0110.00414.43
5.5.130.0120.00314.57
5.5.120.0090.00314.46
5.5.110.0080.00614.66
5.5.100.0080.00414.55
5.5.90.0060.00614.55
5.5.80.0030.01014.70
5.5.70.0080.00414.67
5.5.60.0000.01114.32
5.5.50.0000.01314.62
5.5.40.0060.00614.52
5.5.30.0090.00314.28
5.5.20.0030.01014.70
5.5.10.0060.00314.31
5.5.00.0120.00014.58
5.4.450.0220.01916.24
5.4.440.0350.02216.22
5.4.430.0130.02116.25
5.4.420.0500.02516.20
5.4.410.0310.02516.12
5.4.400.0210.02915.87
5.4.390.0180.03315.83
5.4.380.0130.02315.74
5.4.370.0180.02015.87
5.4.360.0080.02715.85
5.4.350.0060.03015.89
5.4.340.0100.02515.83
5.4.330.0030.00512.79
5.4.320.0030.02412.79
5.4.310.0050.02312.79
5.4.300.0050.02412.79
5.4.290.0080.02612.79
5.4.280.0070.01912.73
5.4.270.0040.02412.73
5.4.260.0040.02512.73
5.4.250.0050.02512.73
5.4.240.0050.02512.73
5.4.230.0040.02212.73
5.4.220.0060.02212.73
5.4.210.0050.02312.73
5.4.200.0040.02212.73
5.4.190.0060.02112.72
5.4.180.0020.02212.73
5.4.170.0040.02112.73
5.4.160.0040.02212.73
5.4.150.0080.02012.73
5.4.140.0060.02112.57
5.4.130.0040.02212.56
5.4.120.0070.01912.54
5.4.110.0090.01812.54
5.4.100.0040.02112.54
5.4.90.0040.02212.54
5.4.80.0070.02012.54
5.4.70.0060.01912.54
5.4.60.0040.02112.54
5.4.50.0040.02312.54
5.4.40.0030.02112.53
5.4.30.0050.02012.53
5.4.20.0040.02312.53
5.4.10.0060.01812.53
5.4.00.0060.02312.28
5.3.290.0070.02312.92
5.3.280.0040.02412.88
5.3.270.0030.02612.89
5.3.260.0070.02212.89
5.3.250.0050.02412.89
5.3.240.0080.02112.89
5.3.230.0070.01912.88
5.3.220.0040.02312.87
5.3.210.0040.02312.87
5.3.200.0040.02112.87
5.3.190.0050.02412.87
5.3.180.0090.01912.87
5.3.170.0070.02112.87
5.3.160.0050.02212.87
5.3.150.0040.02312.87
5.3.140.0060.01912.86
5.3.130.0040.02412.86
5.3.120.0040.02212.86
5.3.110.0040.02312.86
5.3.100.0050.02012.60
5.3.90.0040.02512.59
5.3.80.0040.02112.59
5.3.70.0070.02012.59
5.3.60.0040.02712.58
5.3.50.0060.02312.55
5.3.40.0050.02412.55
5.3.30.0070.01812.53
5.3.20.0050.01812.42
5.3.10.0080.01712.41
5.3.00.0050.02812.40
5.2.170.0070.0299.50
5.2.160.0020.0329.50
5.2.150.0040.0319.50
5.2.140.0070.0289.50
5.2.130.0060.0279.46
5.2.120.0040.0299.46
5.2.110.0080.0259.46
5.2.100.0050.0299.46
5.2.90.0050.0289.46
5.2.80.0050.0309.46
5.2.70.0070.0309.46
5.2.60.0050.0379.41
5.2.50.0060.0299.39
5.2.40.0040.0299.36
5.2.30.0050.0309.34
5.2.20.0060.0289.36
5.2.10.0040.0309.30
5.2.00.0050.0319.16
5.1.60.0080.0228.45
5.1.50.0030.0278.45
5.1.40.0060.0298.43
5.1.30.0050.0378.79
5.1.20.0040.0538.80
5.1.10.0090.0268.53
5.1.00.0040.0288.53
5.0.50.0070.0207.00
5.0.40.0040.0226.86
5.0.30.0060.0466.68
5.0.20.0040.0216.65
5.0.10.0050.0216.63
5.0.00.0080.0306.61
4.4.90.0050.0144.78
4.4.80.0040.0154.76
4.4.70.0020.0174.75
4.4.60.0020.0174.76
4.4.50.0030.0174.77
4.4.40.0050.0264.71
4.4.30.0010.0184.76
4.4.20.0080.0124.84
4.4.10.0010.0174.84
4.4.00.0020.0264.76
4.3.110.0040.0144.67
4.3.100.0020.0184.66
4.3.90.0030.0194.63
4.3.80.0030.0254.59
4.3.70.0030.0154.63
4.3.60.0020.0154.63
4.3.50.0020.0174.62
4.3.40.0010.0314.55
4.3.30.0040.0153.35
4.3.20.0020.0163.33
4.3.10.0030.0183.25
4.3.00.0030.01712.90

preferences:
44.01 ms | 401 KiB | 5 Q