3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = <<<EOT <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> EOT; $output .= "<string>" . "Hello" . "</string>"; $output .= <<<EOT </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> EOT; echo $output; $output = <<<EOT <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> EOT; $output .= "<string>" . "Hello" . "</string>"; $output .= <<<EOT </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> EOT; $foobar = <<<EOT <foo>bar</foo> EOT; $EOT = <<<EOT <bar>my foobar</bar> EOT; echo $output; echo $foobar; echo $EOT;
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key><foo>bar</foo><bar>my foobar</bar>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> Notice: Undefined variable: EOT in /in/peQLX on line 38 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> <foo>bar</foo> EOT; = <<<EOT <bar>my foobar</bar> Notice: Undefined variable: EOT in /in/peQLX on line 44
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> Notice: Undefined variable: EOT in /in/peQLX on line 39 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" Yadda yadda yadda <dict> <key>default</key> <string>Hello</string> </dict> <key>anchorLeft</key> <string>1</string> <key>anchorRight</key> <foo>bar</foo> EOT; = <<<EOT <bar>my foobar</bar> Notice: Undefined variable: EOT in /in/peQLX on line 44

preferences:
212.67 ms | 404 KiB | 183 Q