3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $badge = '<img src="www.pampy.de" />'; if(is_string($badge)) { // Try to parse the html code to get the url preg_match('/src="([^\s"]+)/', $badge, $matches); if(is_array($matches) && count($matches) > 0) { $this->topBadge = $matches[0]; $this->additionalDeliveryInfo = I18n::t('Guaranteed delivery before christmas'); } }
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/1ZiPZ:7 Stack trace: #0 {main} thrown in /in/1ZiPZ on line 7
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Using $this when not in object context in /in/1ZiPZ on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'i18n' in /in/1ZiPZ on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'i18n' in /in/1ZiPZ on line 8