3v4l.org

run code in 300+ PHP versions simultaneously
<?php $counter = 0; $counter2 = 20; $content = file_get_contents("http://example.com"); // sleep(2); while($counter < $counter2) { $counter++; $first_step = explode( '<h2 class="rgs">' , $content ); $second_step = explode("</h2>" , $first_step[$counter] ); // echo $second_step[0]; $link[$counter] = htmlspecialchars($second_step[0]); // echo "$link"; // echo "<br>"; }
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for example.com failed: System error in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): Failed to open stream: php_network_getaddresses: getaddrinfo for example.com failed: System error in /in/VUbQG on line 5 Warning: Undefined array key 1 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 2 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 3 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 4 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 5 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 6 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 7 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 8 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 9 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 10 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 11 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 12 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 13 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 14 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 15 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 16 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 17 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 18 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 19 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12 Warning: Undefined array key 20 in /in/VUbQG on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/VUbQG on line 12
Output for 8.0.13 - 8.0.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5 Warning: Undefined array key 1 in /in/VUbQG on line 12 Warning: Undefined array key 2 in /in/VUbQG on line 12 Warning: Undefined array key 3 in /in/VUbQG on line 12 Warning: Undefined array key 4 in /in/VUbQG on line 12 Warning: Undefined array key 5 in /in/VUbQG on line 12 Warning: Undefined array key 6 in /in/VUbQG on line 12 Warning: Undefined array key 7 in /in/VUbQG on line 12 Warning: Undefined array key 8 in /in/VUbQG on line 12 Warning: Undefined array key 9 in /in/VUbQG on line 12 Warning: Undefined array key 10 in /in/VUbQG on line 12 Warning: Undefined array key 11 in /in/VUbQG on line 12 Warning: Undefined array key 12 in /in/VUbQG on line 12 Warning: Undefined array key 13 in /in/VUbQG on line 12 Warning: Undefined array key 14 in /in/VUbQG on line 12 Warning: Undefined array key 15 in /in/VUbQG on line 12 Warning: Undefined array key 16 in /in/VUbQG on line 12 Warning: Undefined array key 17 in /in/VUbQG on line 12 Warning: Undefined array key 18 in /in/VUbQG on line 12 Warning: Undefined array key 19 in /in/VUbQG on line 12 Warning: Undefined array key 20 in /in/VUbQG on line 12
Output for 8.0.0 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/VUbQG on line 5 Warning: Undefined array key 1 in /in/VUbQG on line 12 Warning: Undefined array key 2 in /in/VUbQG on line 12 Warning: Undefined array key 3 in /in/VUbQG on line 12 Warning: Undefined array key 4 in /in/VUbQG on line 12 Warning: Undefined array key 5 in /in/VUbQG on line 12 Warning: Undefined array key 6 in /in/VUbQG on line 12 Warning: Undefined array key 7 in /in/VUbQG on line 12 Warning: Undefined array key 8 in /in/VUbQG on line 12 Warning: Undefined array key 9 in /in/VUbQG on line 12 Warning: Undefined array key 10 in /in/VUbQG on line 12 Warning: Undefined array key 11 in /in/VUbQG on line 12 Warning: Undefined array key 12 in /in/VUbQG on line 12 Warning: Undefined array key 13 in /in/VUbQG on line 12 Warning: Undefined array key 14 in /in/VUbQG on line 12 Warning: Undefined array key 15 in /in/VUbQG on line 12 Warning: Undefined array key 16 in /in/VUbQG on line 12 Warning: Undefined array key 17 in /in/VUbQG on line 12 Warning: Undefined array key 18 in /in/VUbQG on line 12 Warning: Undefined array key 19 in /in/VUbQG on line 12 Warning: Undefined array key 20 in /in/VUbQG on line 12
Output for 5.4.2 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.1.20, 7.2.0 - 7.2.6, 7.4.0, 7.4.26 - 7.4.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5 Notice: Undefined offset: 1 in /in/VUbQG on line 12 Notice: Undefined offset: 2 in /in/VUbQG on line 12 Notice: Undefined offset: 3 in /in/VUbQG on line 12 Notice: Undefined offset: 4 in /in/VUbQG on line 12 Notice: Undefined offset: 5 in /in/VUbQG on line 12 Notice: Undefined offset: 6 in /in/VUbQG on line 12 Notice: Undefined offset: 7 in /in/VUbQG on line 12 Notice: Undefined offset: 8 in /in/VUbQG on line 12 Notice: Undefined offset: 9 in /in/VUbQG on line 12 Notice: Undefined offset: 10 in /in/VUbQG on line 12 Notice: Undefined offset: 11 in /in/VUbQG on line 12 Notice: Undefined offset: 12 in /in/VUbQG on line 12 Notice: Undefined offset: 13 in /in/VUbQG on line 12 Notice: Undefined offset: 14 in /in/VUbQG on line 12 Notice: Undefined offset: 15 in /in/VUbQG on line 12 Notice: Undefined offset: 16 in /in/VUbQG on line 12 Notice: Undefined offset: 17 in /in/VUbQG on line 12 Notice: Undefined offset: 18 in /in/VUbQG on line 12 Notice: Undefined offset: 19 in /in/VUbQG on line 12 Notice: Undefined offset: 20 in /in/VUbQG on line 12
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/VUbQG on line 5 Notice: Undefined offset: 1 in /in/VUbQG on line 12 Notice: Undefined offset: 2 in /in/VUbQG on line 12 Notice: Undefined offset: 3 in /in/VUbQG on line 12 Notice: Undefined offset: 4 in /in/VUbQG on line 12 Notice: Undefined offset: 5 in /in/VUbQG on line 12 Notice: Undefined offset: 6 in /in/VUbQG on line 12 Notice: Undefined offset: 7 in /in/VUbQG on line 12 Notice: Undefined offset: 8 in /in/VUbQG on line 12 Notice: Undefined offset: 9 in /in/VUbQG on line 12 Notice: Undefined offset: 10 in /in/VUbQG on line 12 Notice: Undefined offset: 11 in /in/VUbQG on line 12 Notice: Undefined offset: 12 in /in/VUbQG on line 12 Notice: Undefined offset: 13 in /in/VUbQG on line 12 Notice: Undefined offset: 14 in /in/VUbQG on line 12 Notice: Undefined offset: 15 in /in/VUbQG on line 12 Notice: Undefined offset: 16 in /in/VUbQG on line 12 Notice: Undefined offset: 17 in /in/VUbQG on line 12 Notice: Undefined offset: 18 in /in/VUbQG on line 12 Notice: Undefined offset: 19 in /in/VUbQG on line 12 Notice: Undefined offset: 20 in /in/VUbQG on line 12
Output for 7.3.32 - 7.3.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/VUbQG on line 5
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.5.35, 5.6.8 - 5.6.17, 5.6.20 - 5.6.28, 7.0.0 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/VUbQG on line 5 Warning: file_get_contents(http://example.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/VUbQG on line 5 Notice: Undefined offset: 1 in /in/VUbQG on line 12 Notice: Undefined offset: 2 in /in/VUbQG on line 12 Notice: Undefined offset: 3 in /in/VUbQG on line 12 Notice: Undefined offset: 4 in /in/VUbQG on line 12 Notice: Undefined offset: 5 in /in/VUbQG on line 12 Notice: Undefined offset: 6 in /in/VUbQG on line 12 Notice: Undefined offset: 7 in /in/VUbQG on line 12 Notice: Undefined offset: 8 in /in/VUbQG on line 12 Notice: Undefined offset: 9 in /in/VUbQG on line 12 Notice: Undefined offset: 10 in /in/VUbQG on line 12 Notice: Undefined offset: 11 in /in/VUbQG on line 12 Notice: Undefined offset: 12 in /in/VUbQG on line 12 Notice: Undefined offset: 13 in /in/VUbQG on line 12 Notice: Undefined offset: 14 in /in/VUbQG on line 12 Notice: Undefined offset: 15 in /in/VUbQG on line 12 Notice: Undefined offset: 16 in /in/VUbQG on line 12 Notice: Undefined offset: 17 in /in/VUbQG on line 12 Notice: Undefined offset: 18 in /in/VUbQG on line 12 Notice: Undefined offset: 19 in /in/VUbQG on line 12 Notice: Undefined offset: 20 in /in/VUbQG on line 12

preferences:
184.2 ms | 405 KiB | 222 Q