3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $paymentdate = "Sat May 16 2015 07:55:49 GMT+0400 (GMT Daylight Time)"; $start = stripos($paymentdate, "gmt"); echo $start . "\n"; $paystr = substr($paymentdate, 0, $start); echo $paystr . "\n"; $paystr1 = substr($paymentdate, $start); echo $paystr1 . "\n"; $paystr2 = substr($paystr2, 3); echo $paystr2 . "\n"; $paytime = strtotime($paystr); echo $paytime . "\n"; $mdate = date('Y-m-d h:i:s', $paytime); echo $mdate . "\n";
based on HS1qA
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Ih8m8
function name:  (null)
number of ops:  44
compiled vars:  !0 = $paymentdate, !1 = $start, !2 = $paystr, !3 = $paystr1, !4 = $paystr2, !5 = $paytime, !6 = $mdate
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, 'Sat+May+16+2015+07%3A55%3A49+GMT%2B0400+%28GMT+Daylight+Time%29'
   4     1        INIT_FCALL                                               'stripos'
         2        SEND_VAR                                                 !0
         3        SEND_VAL                                                 'gmt'
         4        DO_ICALL                                         $8      
         5        ASSIGN                                                   !1, $8
   5     6        CONCAT                                           ~10     !1, '%0A'
         7        ECHO                                                     ~10
   6     8        INIT_FCALL                                               'substr'
         9        SEND_VAR                                                 !0
        10        SEND_VAL                                                 0
        11        SEND_VAR                                                 !1
        12        DO_ICALL                                         $11     
        13        ASSIGN                                                   !2, $11
   7    14        CONCAT                                           ~13     !2, '%0A'
        15        ECHO                                                     ~13
   8    16        INIT_FCALL                                               'substr'
        17        SEND_VAR                                                 !0
        18        SEND_VAR                                                 !1
        19        DO_ICALL                                         $14     
        20        ASSIGN                                                   !3, $14
   9    21        CONCAT                                           ~16     !3, '%0A'
        22        ECHO                                                     ~16
  10    23        INIT_FCALL                                               'substr'
        24        SEND_VAR                                                 !4
        25        SEND_VAL                                                 3
        26        DO_ICALL                                         $17     
        27        ASSIGN                                                   !4, $17
  11    28        CONCAT                                           ~19     !4, '%0A'
        29        ECHO                                                     ~19
  12    30        INIT_FCALL                                               'strtotime'
        31        SEND_VAR                                                 !2
        32        DO_ICALL                                         $20     
        33        ASSIGN                                                   !5, $20
  13    34        CONCAT                                           ~22     !5, '%0A'
        35        ECHO                                                     ~22
  14    36        INIT_FCALL                                               'date'
        37        SEND_VAL                                                 'Y-m-d+h%3Ai%3As'
        38        SEND_VAR                                                 !5
        39        DO_ICALL                                         $23     
        40        ASSIGN                                                   !6, $23
  15    41        CONCAT                                           ~25     !6, '%0A'
        42        ECHO                                                     ~25
        43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.1.0