3v4l.org

run code in 300+ PHP versions simultaneously
<?php mt_srand(42, MT_RAND_MT19937); print mt_rand() ."\n"; print mt_rand() ."\n"; mt_srand(42, MT_RAND_MT19937); print mt_rand() ."\n"; print mt_rand() ."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TkZ4i
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mt_srand'
          1        SEND_VAL                                                 42
          2        SEND_VAL                                                 0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'mt_rand'
          5        DO_ICALL                                         $1      
          6        CONCAT                                           ~2      $1, '%0A'
          7        ECHO                                                     ~2
    5     8        INIT_FCALL                                               'mt_rand'
          9        DO_ICALL                                         $3      
         10        CONCAT                                           ~4      $3, '%0A'
         11        ECHO                                                     ~4
    7    12        INIT_FCALL                                               'mt_srand'
         13        SEND_VAL                                                 42
         14        SEND_VAL                                                 0
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'mt_rand'
         17        DO_ICALL                                         $6      
         18        CONCAT                                           ~7      $6, '%0A'
         19        ECHO                                                     ~7
    9    20        INIT_FCALL                                               'mt_rand'
         21        DO_ICALL                                         $8      
         22        CONCAT                                           ~9      $8, '%0A'
         23        ECHO                                                     ~9
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.26 ms | 1395 KiB | 17 Q