3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <root> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>a</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>b</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>c</image> </area> <area> <photographer_id>2</photographer_id> <photographer>Fred</photographer> <image>a</image> </area> </root> XML; $sxe = new SimpleXMLElement($xml); $searchKeyword = "John"; $area = $sxe->xpath("//area[contains(photographer,'".$searchKeyword."')]"); print_r($area);

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.0140.00716.88
8.3.50.0130.00922.27
8.3.40.0000.01619.09
8.3.30.0090.00919.20
8.3.20.0050.00220.71
8.3.10.0080.00022.20
8.3.00.0030.00619.75
8.2.180.0190.00318.56
8.2.170.0100.01022.96
8.2.160.0070.00722.30
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0100.00018.14
8.2.110.0060.00319.70
8.2.100.0100.00317.88
8.2.90.0030.00519.42
8.2.80.0040.00418.00
8.2.70.0040.00717.75
8.2.60.0080.00018.18
8.2.50.0000.00818.07
8.2.40.0030.00518.41
8.2.30.0050.00318.32
8.2.20.0050.00318.08
8.2.10.0000.00818.40
8.2.00.0000.00718.07
8.1.280.0080.00825.92
8.1.270.0030.00619.20
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00624.29
8.1.230.0070.00418.97
8.1.220.0040.00418.15
8.1.210.0040.00418.77
8.1.200.0040.00417.72
8.1.190.0040.00417.38
8.1.180.0060.00318.10
8.1.170.0060.00320.82
8.1.160.0040.00422.25
8.1.150.0000.00819.27
8.1.140.0000.00817.64
8.1.130.0070.00018.22
8.1.120.0040.00417.69
8.1.110.0020.00517.79
8.1.100.0040.00417.81
8.1.90.0080.00017.70
8.1.80.0030.00517.87
8.1.70.0040.00417.87
8.1.60.0040.00417.86
8.1.50.0040.00417.89
8.1.40.0030.00617.79
8.1.30.0060.00318.04
8.1.20.0040.00417.82
8.1.10.0040.00417.73
8.1.00.0030.00717.82
8.0.300.0000.00818.77
8.0.290.0030.00517.13
8.0.280.0040.00418.84
8.0.270.0000.00717.64
8.0.260.0060.00017.55
8.0.250.0000.00717.28
8.0.240.0040.00417.39
8.0.230.0040.00417.34
8.0.220.0030.00317.20
8.0.210.0000.00717.15
8.0.200.0030.00317.27
8.0.190.0030.00517.48
8.0.180.0040.00417.20
8.0.170.0030.00617.23
8.0.160.0020.00517.24
8.0.150.0070.00017.26
8.0.140.0040.00417.28
8.0.130.0030.00313.72
8.0.120.0000.00917.17
8.0.110.0040.00417.29
8.0.100.0050.00217.38
8.0.90.0070.00017.45
8.0.80.0070.01117.38
8.0.70.0020.00517.26
8.0.60.0040.00417.14
8.0.50.0000.00817.14
8.0.30.0120.01617.46
8.0.20.0110.01117.57
8.0.10.0080.00017.35
8.0.00.0100.00917.06
7.4.330.0030.00315.42
7.4.320.0000.00616.86
7.4.300.0000.00716.84
7.4.290.0000.00716.77
7.4.280.0040.00416.73
7.4.270.0040.00416.82
7.4.260.0080.00016.73
7.4.250.0040.00416.91
7.4.240.0060.00116.82
7.4.230.0030.00516.82
7.4.220.0130.00616.83
7.4.210.0070.00716.80
7.4.200.0040.00416.82
7.4.160.0060.01016.81
7.4.150.0100.01017.40
7.4.140.0090.01117.86
7.4.130.0090.00916.81
7.4.120.0100.00716.83
7.4.110.0140.01016.88
7.4.100.0030.01416.76
7.4.90.0030.01416.73
7.4.80.0140.00316.88
7.4.70.0040.01616.73
7.4.60.0130.00316.80
7.4.50.0060.00316.89
7.4.40.0120.00416.69
7.4.30.0090.00916.91
7.4.00.0180.00015.22
7.3.330.0050.00013.32
7.3.320.0000.01113.34
7.3.310.0030.00316.46
7.3.300.0050.00216.62
7.3.290.0100.00616.63
7.3.280.0080.01316.65
7.3.270.0100.00617.40
7.3.260.0090.00916.95
7.3.250.0110.01216.93
7.3.240.0070.01016.57
7.3.230.0120.01216.68
7.3.210.0070.01016.61
7.3.200.0110.00919.39
7.3.190.0060.01516.70
7.3.180.0040.01216.77
7.3.170.0120.00916.70
7.3.160.0140.00716.71
7.2.330.0040.01316.83
7.2.320.0090.00916.82
7.2.310.0110.00717.05
7.2.300.0160.03516.89
7.2.290.0070.01016.57
7.2.00.0070.01119.24
7.1.100.0120.01216.35
7.1.70.0060.00317.34
7.1.60.0070.01619.50
7.1.50.0100.01316.85
7.1.00.0070.07322.68
7.0.200.0610.00715.02
7.0.140.0030.06722.26
7.0.60.0270.04320.21
7.0.50.0170.03718.16
7.0.40.0130.06720.51
7.0.30.0200.04320.38
7.0.20.0270.08020.37
7.0.10.0200.07720.45
7.0.00.0100.08720.28
5.6.280.0030.07721.13
5.6.210.0130.08720.78
5.6.200.0070.06718.43
5.6.190.0000.05720.63
5.6.180.0230.08020.66
5.6.170.0570.06320.74
5.6.160.0070.05320.69
5.6.150.0200.07018.39
5.6.140.0070.07318.38
5.6.130.0130.07718.33
5.6.120.0130.08021.28
5.6.110.0100.04321.11
5.6.100.0030.08021.14
5.6.90.0030.07321.16
5.6.80.0170.07020.70
5.6.70.0400.06320.58
5.5.350.0230.03720.52
5.5.340.0000.08018.26
5.5.330.0030.08020.50
5.5.320.0130.04020.69
5.5.310.0300.06720.57
5.5.300.0070.04718.07
5.5.290.0130.03318.23
5.5.280.0270.06320.99
5.5.270.0170.07321.09
5.5.260.0100.05720.94
5.5.250.0070.07720.73
5.5.240.0130.07720.29
5.4.450.0600.06719.63
5.4.440.1000.05319.46
5.4.430.0570.05719.84
5.4.420.1000.05719.47
5.4.410.0700.06019.61
5.4.400.0330.05719.04
5.4.390.0170.06718.97
5.4.380.0330.06318.91
5.4.370.0430.06718.83
5.4.360.0330.05318.93
5.4.350.0300.06019.00
5.4.340.0230.06318.99
5.4.320.0330.06018.93
5.4.310.0370.07018.82
5.4.300.0500.06018.96
5.4.290.0330.07018.79
5.4.280.0500.05018.68
5.4.270.0270.06318.95
5.4.260.0270.06018.83
5.4.250.0370.05318.80
5.4.240.0300.05718.92
5.4.230.0300.07718.79
5.4.220.0370.04718.64
5.4.210.0330.05018.98
5.4.200.0400.05316.77
5.4.190.0330.05018.88
5.4.180.0330.05718.96
5.4.170.0400.04318.89
5.4.160.0270.05718.94
5.4.150.0330.05318.97
5.4.140.0300.05316.51
5.4.130.0330.04716.50
5.4.120.0330.05316.46
5.4.110.0400.04716.51
5.4.100.0330.05016.45
5.4.90.0400.06316.55
5.4.80.0330.04716.50
5.4.70.0370.04716.38
5.4.60.0230.05716.54
5.4.50.0230.05716.50
5.4.40.0370.06716.39
5.4.30.0270.06016.38
5.4.20.0530.05716.46
5.4.10.0300.05016.52
5.4.00.0300.05016.01
5.3.290.0270.06015.05
5.3.280.0200.07014.79
5.3.270.0300.06014.80
5.3.260.0330.05714.94
5.3.250.0270.06014.80
5.3.240.0330.05714.82
5.3.230.0300.05314.98
5.3.220.0200.06314.89
5.3.210.0230.05714.82
5.3.200.0370.04714.75
5.3.190.0400.05314.75
5.3.180.0300.05014.89
5.3.170.0230.05714.97
5.3.160.0300.06014.94
5.3.150.0400.06714.76
5.3.140.0370.05714.86
5.3.130.0330.05314.89
5.3.120.0430.06314.74
5.3.110.0430.06014.78
5.3.100.0300.06314.41
5.3.90.0370.04314.36
5.3.80.0300.05314.29
5.3.70.0370.05314.45
5.3.60.0430.05014.42
5.3.50.0300.05314.29
5.3.40.0430.04014.29
5.3.30.0300.05014.11
5.3.20.0270.05714.02
5.3.10.0400.05014.07
5.3.00.0230.06313.82
5.2.170.0370.05311.41
5.2.160.0200.04711.46
5.2.150.0270.04711.31
5.2.140.0130.05311.33
5.2.130.0200.04311.53
5.2.120.0300.03311.26
5.2.110.0370.04711.30
5.2.100.0370.04711.30
5.2.90.0300.03311.52
5.2.80.0270.04311.27
5.2.70.0230.04711.43
5.2.60.0200.04311.29
5.2.50.0230.04311.18
5.2.40.0230.04711.24
5.2.30.0270.03711.38
5.2.20.0270.03711.19
5.2.10.0230.04011.17
5.2.00.0230.04310.94
5.1.60.0200.03310.19
5.1.50.0200.03310.33
5.1.40.0130.04010.27
5.1.30.0270.02710.54
5.1.20.0170.03710.57
5.1.10.0200.03310.36
5.1.00.0230.03010.38
5.0.50.0030.0338.74
5.0.40.0130.0278.59
5.0.30.0030.0508.47
5.0.20.0130.0338.59
5.0.10.0130.0308.49
5.0.00.0170.0438.36
4.4.90.0100.0205.95
4.4.80.0130.0205.91
4.4.70.0100.0235.89
4.4.60.0130.0175.88
4.4.50.0100.0205.95
4.4.40.0100.0335.91
4.4.30.0070.0235.96
4.4.20.0070.0275.99
4.4.10.0200.0205.98
4.4.00.0100.0335.97
4.3.110.0070.0235.83
4.3.100.0130.0175.90
4.3.90.0130.0205.84
4.3.80.0000.0405.91
4.3.70.0100.0205.83
4.3.60.0070.0235.89
4.3.50.0100.0205.79
4.3.40.0100.0335.77
4.3.30.0030.0234.71
4.3.20.0100.0204.71
4.3.10.0070.0204.71
4.3.00.0100.0236.95

preferences:
43.82 ms | 401 KiB | 5 Q