3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $discount = 33; $sale_end = ''; $sale_end = substr($sale_end, 0, 10); $fromDate = date('F d', strtotime($sale_end)); echo sprintf('%d%% OFF Ends %s', $discount, $fromDate);
Output for 5.1.2 - 7.1.0
33% OFF Ends January 01
Output for 5.1.0 - 5.1.1
33% OFF Ends January 22
Output for 5.0.1 - 5.0.5
Warning: strtotime(): Called with an empty time parameter. in /in/D3euV on line 6 33% OFF Ends January 01
Output for 4.3.2 - 5.0.0
Notice: strtotime(): Called with empty time parameter in /in/D3euV on line 6 33% OFF Ends January 22
Output for 4.3.0 - 4.3.1
Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/D3euV on line 6 33% OFF Ends January 22