3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DudenResponse { protected $response; public function __construct($response) { $this->response = $response; $this ->stripShit() ->decode() ->mockXML(); } protected function stripShit() { $this->response = substr($this->response, 36-1); return $this; } protected function decode() { $response = preg_replace("/\\\\u([0-9a-f]{3,4})/i", "&#x\\1;", $this->response); $this->response = html_entity_decode($response, null, 'UTF-8'); return $this; } protected function mockXML() { $this->response = str_replace([ '<?dpf ', ' ?>', '?>' ], [ '<', '>', '>' ], $this->response); return $this; } public function toArray() { $xml = simplexml_load_string($this->toString()); $array = []; foreach ($xml as $node) { $array[$node] = explode(';', $node->attributes()['prop']); } } public function toString() { return $this->response; } public function __toString() { return $this->toString(); } } $response = "0;78d13qqoglyszmorspfwfdmwffgnubgr;\u003c?dpf sent len=\"1\"?\u003e\u003c?dpf orth code=\"unknown\" prop=\"Lesen;Lehnen;Lehren;Leasen;Leisen\" ?\u003elehsen\u003c?dpf /orth ?\u003e\u003c?dpf /sent ?\u003e"; /*$response = preg_replace("/\\\\u([0-9a-f]{3,4})/i", "&#x\\1;", $response); $response = html_entity_decode($response , null, 'UTF-8'); $response = str_replace([ '<?dpf ', ' ?>', '?>' ], [ '<', '>', '>' ], $response); $response = substr($response, 36-1);*/ $response = new DudenResponse($response); echo $response; echo "\n\n-----\n\n"; print_r($response->toArray());

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.0120.00319.29
8.3.30.0170.00019.31
8.3.20.0090.00020.32
8.3.10.0060.00323.52
8.3.00.0060.00319.88
8.2.170.0150.00322.96
8.2.160.0100.00619.29
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00321.33
8.2.110.0050.00520.82
8.2.100.0030.00918.72
8.2.90.0040.00419.59
8.2.80.0030.00518.13
8.2.70.0030.00618.00
8.2.60.0080.00018.41
8.2.50.0080.00018.07
8.2.40.0050.00320.25
8.2.30.0000.01118.27
8.2.20.0000.00818.22
8.2.10.0000.00718.36
8.2.00.0030.00618.31
8.1.270.0060.00324.09
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.42
8.1.230.0070.00419.46
8.1.220.0030.00518.02
8.1.210.0060.00318.77
8.1.200.0030.00717.73
8.1.190.0040.00417.85
8.1.180.0080.00018.10
8.1.170.0060.00319.16
8.1.160.0040.00422.23
8.1.150.0040.00419.16
8.1.140.0040.00417.72
8.1.130.0000.00718.10
8.1.120.0000.00817.79
8.1.110.0050.00317.80
8.1.100.0070.00017.71
8.1.90.0000.00817.77
8.1.80.0070.00017.77
8.1.70.0000.00717.77
8.1.60.0000.00917.88
8.1.50.0040.00517.81
8.1.40.0030.00517.96
8.1.30.0040.00418.07
8.1.20.0090.00017.96
8.1.10.0000.00818.02
8.1.00.0000.00817.78
8.0.300.0040.00418.77
8.0.290.0050.00217.25
8.0.280.0070.00018.62
8.0.270.0040.00417.54
8.0.260.0030.00317.57
8.0.250.0080.00017.25
8.0.240.0040.00417.51
8.0.230.0000.00817.31
8.0.220.0000.00717.35
8.0.210.0040.00317.23
8.0.200.0040.00417.36
8.0.190.0060.00317.50
8.0.180.0040.00417.47
8.0.170.0080.00017.41
8.0.160.0050.00317.38
8.0.150.0000.00717.21
8.0.140.0040.00417.17
8.0.130.0030.00613.84
8.0.120.0030.00517.40
8.0.110.0070.00017.33
8.0.100.0040.00417.41
8.0.90.0000.00717.39
8.0.80.0060.01017.30
8.0.70.0000.00817.31
8.0.60.0030.00517.31
8.0.50.0040.00417.15
8.0.30.0110.00917.56
8.0.20.0090.01317.49
8.0.10.0090.00017.33
8.0.00.0110.00817.34
7.4.330.0030.00315.37
7.4.320.0070.00017.01
7.4.300.0030.00316.81
7.4.290.0080.00017.02
7.4.280.0050.00317.01
7.4.270.0070.00016.98
7.4.260.0000.00717.05
7.4.250.0000.00817.05
7.4.240.0030.00417.05
7.4.230.0000.00817.07
7.4.220.0120.01216.93
7.4.210.0000.01417.01
7.4.200.0040.00416.97
7.4.160.0090.00916.92
7.4.150.0070.01017.40
7.4.140.0060.01117.86
7.4.130.0090.00917.03
7.4.120.0100.00716.94
7.4.110.0060.01617.10
7.4.100.0030.02116.94
7.4.90.0070.01116.81
7.4.80.0000.01719.39
7.4.70.0100.00817.14
7.4.60.0080.00916.96
7.4.50.0030.00317.02
7.4.40.0150.00916.88
7.4.30.0060.01117.11
7.4.00.0040.01315.17
7.3.330.0060.00313.76
7.3.320.0000.00713.66
7.3.310.0030.00316.87
7.3.300.0050.00216.82
7.3.290.0120.00616.78
7.3.280.0070.01116.79
7.3.270.0090.00917.40
7.3.260.0150.00916.99
7.3.250.0090.00916.83
7.3.240.0040.01716.84
7.3.230.0160.00017.03
7.3.210.0090.00916.79
7.3.200.0030.01319.39
7.3.190.0100.00616.76
7.3.180.0060.01216.99
7.3.170.0120.00616.90
7.3.160.0160.00017.11
7.3.120.0100.00615.27
7.3.110.0000.01715.14
7.3.100.0050.01115.11
7.3.90.0060.01115.18
7.3.80.0080.00715.16
7.3.70.0090.00315.17
7.3.60.0070.01015.20
7.3.50.0050.01115.21
7.3.40.0090.00815.02
7.3.30.0080.00315.27
7.3.20.0100.00517.01
7.3.10.0080.00816.97
7.3.00.0030.01316.99
7.2.330.0090.00917.14
7.2.320.0070.01017.04
7.2.310.0070.01417.11
7.2.300.0100.01317.22
7.2.290.0120.00617.21
7.2.250.0100.01015.38
7.2.240.0100.01015.47
7.2.230.0110.00715.40
7.2.220.0080.00715.51
7.2.210.0050.01215.39
7.2.200.0060.00615.26
7.2.190.0070.00915.52
7.2.180.0050.01315.42
7.2.170.0060.00915.46
7.2.110.0160.01016.92
7.2.00.0040.00819.68
7.1.330.0080.00716.06
7.1.320.0050.00716.04
7.1.310.0100.00616.18
7.1.300.0030.01316.16
7.1.290.0080.00315.97
7.1.280.0080.00416.14
7.1.270.0040.00916.22
7.1.260.0050.00716.17
7.1.100.0030.01018.84
7.1.70.0090.00917.54
7.1.60.0090.01619.40
7.1.50.0110.01117.39
7.1.00.0070.07322.56
7.0.200.0000.00716.89
7.0.140.0070.07022.13
7.0.60.0030.08320.06
7.0.50.0030.04317.98
7.0.40.0100.07320.40
7.0.30.0330.05020.45
7.0.20.0200.05020.31
7.0.10.0070.07020.30
7.0.00.0100.08720.41
5.6.280.0100.06721.15
5.6.210.0070.05720.65
5.6.200.0030.08318.41
5.6.190.0030.04720.79
5.6.180.0430.05020.81
5.6.170.0200.08020.67
5.6.160.0070.04020.57
5.6.150.0030.04018.19
5.6.140.0130.07318.39
5.6.130.0030.04318.27
5.6.120.0170.04721.13
5.6.110.0130.07721.04
5.6.100.0070.06721.18
5.6.90.0070.08321.19
5.6.80.0130.03320.43
5.5.350.0230.07720.55
5.5.340.0070.08318.12
5.5.330.0030.05320.57
5.5.320.0000.08720.32
5.5.310.0230.07020.45
5.5.300.0070.06318.06
5.5.290.0100.03318.11
5.5.280.0070.08721.01
5.5.270.0030.08721.09
5.5.260.0030.04321.06
5.5.250.0200.08020.75
5.5.240.0200.06320.21
5.4.450.0200.07019.38
5.4.440.0300.04019.48
5.4.430.0270.07719.62
5.4.420.0200.07719.64
5.4.410.0200.07719.36
5.4.400.0300.06319.32
5.4.390.0300.06019.32
5.4.380.0270.03319.39
5.4.370.0300.06019.16
5.4.360.0300.06719.29
5.4.350.0400.03019.08
5.4.340.0300.04319.17
5.4.320.0130.05019.05
5.4.310.0230.04019.39
5.4.300.0270.07719.04
5.4.290.0170.08019.16
5.4.280.0170.04719.29
5.4.270.0230.07019.29
5.4.260.0230.05319.29
5.4.250.0230.07019.29
5.4.240.0330.06318.98
5.4.230.0330.06319.15
5.4.220.0200.06019.07
5.4.210.0130.07719.04
5.4.200.0200.03719.16
5.4.190.0330.04019.24
5.4.180.0270.06319.06
5.4.170.0200.05319.01
5.4.160.0200.03319.14
5.4.150.0130.04319.14
5.4.140.0270.07716.57
5.4.130.0200.05316.45
5.4.120.0200.03316.48
5.4.110.0300.02316.58
5.4.100.0170.03716.72
5.4.90.0200.04016.70
5.4.80.0070.04316.53
5.4.70.0170.03316.38
5.4.60.0170.03316.51
5.4.50.0130.03316.51
5.4.40.0130.03716.63
5.4.30.0070.04016.50
5.4.20.0230.03316.63
5.4.10.0100.04016.55
5.4.00.0270.02715.98
5.3.290.0300.07014.60
5.3.280.0370.06314.65
5.3.270.0130.05714.59
5.3.260.0200.03714.69
5.3.250.0230.05314.52
5.3.240.0270.07014.69
5.3.230.0230.03314.52
5.3.220.0170.03714.58
5.3.210.0130.04014.50
5.3.200.0170.03714.49
5.3.190.0170.03714.66
5.3.180.0130.04014.58
5.3.170.0230.03014.48
5.3.160.0070.04314.59
5.3.150.0170.03314.80
5.3.140.0170.03714.65
5.3.130.0230.02714.57
5.3.120.0130.04314.67
5.3.110.0100.04014.61
5.3.100.0200.03713.98
5.3.90.0200.03014.05
5.3.80.0170.03314.04
5.3.70.0130.03714.10
5.3.60.0130.03714.13
5.3.50.0200.03313.86
5.3.40.0200.03713.88
5.3.30.0170.03014.14
5.3.20.0200.03013.81
5.3.10.0170.03013.71
5.3.00.0170.05013.71
5.2.170.0200.02313.71
5.2.160.0130.03313.71
5.2.150.0130.03013.71
5.2.140.0070.03313.71
5.2.130.0170.02713.71
5.2.120.0170.02313.71
5.2.110.0030.03313.71
5.2.100.0170.03713.71
5.2.90.0070.03313.71
5.2.80.0130.03013.71
5.2.70.0070.03313.71
5.2.60.0070.03313.71
5.2.50.0070.03313.71
5.2.40.0070.03013.71
5.2.30.0130.02313.71
5.2.20.0030.03313.71
5.2.10.0100.02713.71
5.2.00.0170.02013.71
5.1.60.0030.02713.71
5.1.50.0100.04013.71
5.1.40.0170.04013.71
5.1.30.0100.06013.71
5.1.20.0130.03313.71
5.1.10.0230.02713.71
5.1.00.0170.05313.71
5.0.50.0070.04713.71
5.0.40.0170.03313.71
5.0.30.0070.06313.71
5.0.20.0070.04013.71
5.0.10.0030.04013.71
5.0.00.0030.06713.71
4.4.90.0070.01313.71
4.4.80.0000.01713.71
4.4.70.0070.01313.71
4.4.60.0030.01713.71
4.4.50.0030.01713.71
4.4.40.0070.02013.71
4.4.30.0030.02313.71
4.4.20.0100.02313.71
4.4.10.0100.02713.71
4.4.00.0070.04313.71
4.3.110.0100.03313.71
4.3.100.0030.02713.71
4.3.90.0100.02313.71
4.3.80.0130.04013.71
4.3.70.0130.02313.71
4.3.60.0030.03313.71
4.3.50.0100.03013.71
4.3.40.0030.04313.71
4.3.30.0100.03313.71
4.3.20.0100.03313.71
4.3.10.0070.04013.71
4.3.00.0070.03313.71

preferences:
48.57 ms | 400 KiB | 5 Q