3v4l.org

run code in 200+ PHP versions simultaneously
<?php function createTempDir(): ?string { $separator = DIRECTORY_SEPARATOR; $path = rtrim(sys_get_temp_dir(), $separator) . $separator . mt_rand() . microtime(true); $createdTempDir = mkdir($path); if ($createdTempDir) { return $path; } return null; } var_dump(createTempDir());
based on g5Klm
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cca3
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  15     0  E >   INIT_FCALL                                               'var_dump'
         1        INIT_FCALL                                               'createtempdir'
         2        DO_FCALL                                      0  $0      
         3        SEND_VAR                                                 $0
         4        DO_ICALL                                                 
         5      > RETURN                                                   1

Function createtempdir:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cca3
function name:  createTempDir
number of ops:  26
compiled vars:  !0 = $separator, !1 = $path, !2 = $createdTempDir
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   QM_ASSIGN                                                !0
   6     1        INIT_FCALL                                               'rtrim'
         2        INIT_FCALL                                               'sys_get_temp_dir'
         3        DO_ICALL                                         $4      
         4        SEND_VAR                                                 $4
         5        SEND_VAR                                                 !0
         6        DO_ICALL                                         $5      
         7        CONCAT                                           ~6      $5, !0
         8        INIT_FCALL                                               'mt_rand'
         9        DO_ICALL                                         $7      
        10        CONCAT                                           ~8      ~6, $7
        11        INIT_FCALL                                               'microtime'
        12        SEND_VAL                                                 <true>
        13        DO_ICALL                                         $9      
        14        CONCAT                                           ~10     ~8, $9
        15        QM_ASSIGN                                                !1
   7    16        INIT_FCALL                                               'mkdir'
        17        SEND_VAR                                                 !1
        18        DO_ICALL                                         $12     
        19        QM_ASSIGN                                                !2
   8    20      > JMPZ                                                     !2, ->23
   9    21    >   VERIFY_RETURN_TYPE                                       !1
        22      > RETURN                                                   !1
  12    23    > > RETURN                                                   null
  13    24*       VERIFY_RETURN_TYPE                                       
        25*     > RETURN                                                   null

End of function createtempdir

Generated using Vulcan Logic Dumper, using php 7.4.0