3v4l.org

run code in 500+ PHP versions simultaneously
<?php $date = '05/21/1982'; sscanf($date, '%[^/]/%[^/]/%s', $m, $d, $y); var_export(compact(['d','m','y'])); var_export(sscanf($date, '%[^/]/%[^/]/%s')); var_export(sscanf($date, '%d/%d/%d')); $dateObject = DateTime::createFromFormat('m/d/Y', $date); var_export([ $dateObject->format('m'), $dateObject->format('d'), $dateObject->format('Y') ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uZhOJ
function name:  (null)
number of ops:  49
compiled vars:  !0 = $date, !1 = $m, !2 = $d, !3 = $y, !4 = $dateObject
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '05%2F21%2F1982'
    5     1        INIT_FCALL                                                   'sscanf'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     '%25%5B%5E%2F%5D%2F%25%5B%5E%2F%5D%2F%25s'
          4        SEND_REF                                                     !1
          5        SEND_REF                                                     !2
          6        SEND_REF                                                     !3
          7        DO_ICALL                                                     
    7     8        INIT_FCALL                                                   'var_export'
          9        INIT_FCALL                                                   'compact'
         10        SEND_VAL                                                     <array>
         11        DO_ICALL                                             $7      
         12        SEND_VAR                                                     $7
         13        DO_ICALL                                                     
    9    14        INIT_FCALL                                                   'var_export'
         15        INIT_FCALL                                                   'sscanf'
         16        SEND_VAR                                                     !0
         17        SEND_VAL                                                     '%25%5B%5E%2F%5D%2F%25%5B%5E%2F%5D%2F%25s'
         18        DO_ICALL                                             $9      
         19        SEND_VAR                                                     $9
         20        DO_ICALL                                                     
   11    21        INIT_FCALL                                                   'var_export'
         22        INIT_FCALL                                                   'sscanf'
         23        SEND_VAR                                                     !0
         24        SEND_VAL                                                     '%25d%2F%25d%2F%25d'
         25        DO_ICALL                                             $11     
         26        SEND_VAR                                                     $11
         27        DO_ICALL                                                     
   13    28        INIT_STATIC_METHOD_CALL                                      'DateTime', 'createFromFormat'
         29        SEND_VAL                                                     'm%2Fd%2FY'
         30        SEND_VAR                                                     !0
         31        DO_FCALL                                          0  $13     
         32        ASSIGN                                                       !4, $13
   14    33        INIT_FCALL                                                   'var_export'
   15    34        INIT_METHOD_CALL                                             !4, 'format'
         35        SEND_VAL_EX                                                  'm'
         36        DO_FCALL                                          0  $15     
         37        INIT_ARRAY                                           ~16     $15
   16    38        INIT_METHOD_CALL                                             !4, 'format'
         39        SEND_VAL_EX                                                  'd'
         40        DO_FCALL                                          0  $17     
         41        ADD_ARRAY_ELEMENT                                    ~16     $17
   17    42        INIT_METHOD_CALL                                             !4, 'format'
         43        SEND_VAL_EX                                                  'Y'
         44        DO_FCALL                                          0  $18     
         45        ADD_ARRAY_ELEMENT                                    ~16     $18
         46        SEND_VAL                                                     ~16
   14    47        DO_ICALL                                                     
   18    48      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
221.41 ms | 1928 KiB | 16 Q