3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $a = <<<T server { listen 80; server_name www2.smxybbs.net; access_log /home/qwe7002/nginx.access.log; error_log /home/qwe7002/nginx.error.log; index index.php index.html index.htm; location / { sub_filter 'www1.smxybbs.net' 'www2.smxybbs.net'; sub_filter_once off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Referer http://www1.smxybbs.net; proxy_set_header Host www1.smxybbs.net; proxy_pass http://www1.smxybbs.net/; proxy_set_header Accept-Encoding ""; } } T; echo json_encode($a);
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 17 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 18 "server {\n listen 80;\n \n server_name www2.smxybbs.net;\n\n access_log \/home\/qwe7002\/nginx.access.log;\n error_log \/home\/qwe7002\/nginx.error.log;\n\n index index.php index.html index.htm;\n\n location \/ {\n sub_filter 'www1.smxybbs.net' 'www2.smxybbs.net';\n sub_filter_once off;\n proxy_set_header X-Real-IP ; \n proxy_set_header X-Forwarded-For ; \n proxy_set_header Referer http:\/\/www1.smxybbs.net; \n proxy_set_header Host www1.smxybbs.net; \n proxy_pass http:\/\/www1.smxybbs.net\/;\n proxy_set_header Accept-Encoding \"\"; \n }\n}"
Output for 5.2.3 - 5.6.28
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 24 "server {\n listen 80;\n \n server_name www2.smxybbs.net;\n\n access_log \/home\/qwe7002\/nginx.access.log;\n error_log \/home\/qwe7002\/nginx.error.log;\n\n index index.php index.html index.htm;\n\n location \/ {\n sub_filter 'www1.smxybbs.net' 'www2.smxybbs.net';\n sub_filter_once off;\n proxy_set_header X-Real-IP ; \n proxy_set_header X-Forwarded-For ; \n proxy_set_header Referer http:\/\/www1.smxybbs.net; \n proxy_set_header Host www1.smxybbs.net; \n proxy_pass http:\/\/www1.smxybbs.net\/;\n proxy_set_header Accept-Encoding \"\"; \n }\n}"
Output for 5.2.0 - 5.2.2
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 "server {\n listen 80;\n \n server_name www2.smxybbs.net;\n\n access_log \/home\/qwe7002\/nginx.access.log;\n error_log \/home\/qwe7002\/nginx.error.log;\n\n index index.php index.html index.htm;\n\n location \/ {\n sub_filter 'www1.smxybbs.net' 'www2.smxybbs.net';\n sub_filter_once off;\n proxy_set_header X-Real-IP ; \n proxy_set_header X-Forwarded-For ; \n proxy_set_header Referer http:\/\/www1.smxybbs.net; \n proxy_set_header Host www1.smxybbs.net; \n proxy_pass http:\/\/www1.smxybbs.net\/;\n proxy_set_header Accept-Encoding \"\"; \n }\n}"
Output for 5.0.4 - 5.1.1, 5.1.3 - 5.1.6
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function json_encode() in /in/Xkpr2 on line 27
Process exited with code 255.
Output for 5.1.2
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function json_encode() in /in/Xkpr2 on line 28
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function json_encode() in /in/Xkpr2 on line 27
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function: json_encode() in /in/Xkpr2 on line 27
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function: json_encode() in /in/Xkpr2 on line 27
Process exited with code 255.
Output for 4.4.2
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function: json_encode() in /in/Xkpr2 on line 28
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: remote_addr in /in/Xkpr2 on line 18 Notice: Undefined variable: proxy_add_x_forwarded_for in /in/Xkpr2 on line 19 Fatal error: Call to undefined function: json_encode() in /in/Xkpr2 on line 27