3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start();//sessionlar açılıyor $Veriler=array("S","E");//veriler adında bir dizi tanımlayıp 0. elemanı s 1. elemanı e olması sağlanıyor if(isset($_GET['temizle'])){//temizle verisi geldi ise session_unset();//sessionu temizle }//temizle versi gelmedi ise if(isset($_GET['sat']) and isset($_GET['sat'])){//sat ve sut geldi ise $Deger=$Veriler[rand(0,(count($Veriler)-1))];//randomize olarak veriler dizisindeki elemanlarını değer degişkenine koy $_SESSION['tablo'][$_GET['sat']][$_GET['sut']]=$Deger;//belirtilen değerlere deger değişkenindeki veri aktarılıyor $SutDeger=0;//sutdeger e ilk degeri veriliyor $SatDeger=0;//satdeger e ilk degeri veriliyor for($sat=0;$sat<=10;$sat++){//satır kontrolu yapılacak aynı sutunda ve sutnda 3den fazla olunca oyun bitecek if($_SESSION['tablo'][$sat][$_GET['sut']]==$Deger){//aynı sutunda veri varsa $SutDeger++;//sutun değer 1 arttırılıyor } if($_SESSION['tablo'][$_GET['sat']][$sat]==$Deger){//aynı satırda veri varsa $SatDeger++;//satır değer 1 arttırılıyor } }//satır kontrolu sonu if($SatDeger>=3 or $SutDeger>=3){//eğer aynı satırdave sutunda 3den fazla aynı değer varsa session_unset();//sessionları temizle header("location:index.php");//sayfayı index.phpye yönlendir }//3den fazla değer varsa sonu } if(!isset($_GET['sat'])){//gelen veri yoksa for( $k=0;$k<=10;$k++){//dizinin ilk boyutu için döngü açtık for( $l=0;$l<=10;$l++){//dizinin ikinci boyutu için döngü açtık $tablo[$k][$l]=1;//ikiboyutlu dizinin içine 1 atanıyor } //dizinin ikinci boyutu için döngü açtık } //dizinin ilk boyutu için döngü açtık $_SESSION['tablo']=$tablo;//sessiona verileri unutmaması için tablo dizisi atanıyor }//gelen veri yoksa sonu $tablo=$_SESSION['tablo'];//sessiondaki bilşgi tabloya aktarılıyor tablonun özelliği dizi oluyor echo "<table border='2'>"; for($sat=0;$sat<=10;$sat++){//tabloyu ekrana yazdırmak için dizinin ilk boyutunu belirleyecek döngü açılıyor echo "<tr>";//satır açılıyor for($sut=0;$sut<=10;$sut++){//tabloyu ekrana yazdırmak için dizinin ikinci boyutunu belirleyecek döngü açılıyor if($tablo[$sat][$sut]==1){//tablodaki satır ve sutundaki veriler 1 ise aşağıdakileri yap echo "<td><a href='?sat=$sat&sut=$sut'>Tıkla</a></td>";//link koyuluyor }//tablodaki veriler 1 ise sonu else{//tablodaki satır ve sutundaki veriler 2 ise aşağıdakileri yap echo "<td>".$tablo[$sat][$sut]."</td>";//tablodaki veriyi koy }//tablodaki veriler 2 ise sonu }//tabloyu ekrana yazdırmak için dizinin ikinci boyutunu belirleyecek döngü kapatılıyor echo "</tr>";//satır kapatılıyor }//tabloyu ekrana yazdırmak için dizinin ilk boyutunu belirleyecek döngü kapatılıyor echo "</table>"; echo "<a href='?temizle=1'>temizle</a>";//ekrana temizle butonu koy ?> - See more at: http://www.seyfettinkahveci.com/225-PHP-Dersleri-27-PHP-ile-SOS-Oyunu-Yapimi-#sthash.ekoV6Rw9.dpuf
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 67
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 36
Branch analysis from position: 57
2 jumps found. (Code = 47) Position 1 = 59, Position 2 = 61
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 67
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 87
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 73
Branch analysis from position: 84
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
2 jumps found. (Code = 44) Position 1 = 119, Position 2 = 93
Branch analysis from position: 119
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 93
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
2 jumps found. (Code = 44) Position 1 = 115, Position 2 = 96
Branch analysis from position: 115
2 jumps found. (Code = 44) Position 1 = 119, Position 2 = 93
Branch analysis from position: 119
Branch analysis from position: 93
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 100, Position 2 = 107
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 112
Branch analysis from position: 112
2 jumps found. (Code = 44) Position 1 = 115, Position 2 = 96
Branch analysis from position: 115
Branch analysis from position: 96
Branch analysis from position: 107
2 jumps found. (Code = 44) Position 1 = 115, Position 2 = 96
Branch analysis from position: 115
Branch analysis from position: 96
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 75
Branch analysis from position: 81
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 73
Branch analysis from position: 84
Branch analysis from position: 73
Branch analysis from position: 75
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 75
Branch analysis from position: 81
Branch analysis from position: 75
Branch analysis from position: 87
Branch analysis from position: 67
Branch analysis from position: 61
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 54
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 36
Branch analysis from position: 57
Branch analysis from position: 36
Branch analysis from position: 54
Branch analysis from position: 45
Branch analysis from position: 67
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/MLdHI
function name:  (null)
number of ops:  123
compiled vars:  !0 = $Veriler, !1 = $Deger, !2 = $SutDeger, !3 = $SatDeger, !4 = $sat, !5 = $k, !6 = $l, !7 = $tablo, !8 = $sut
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    3     2        ASSIGN                                                   !0, <array>
    4     3        FETCH_IS                                         ~11     '_GET'
          4        ISSET_ISEMPTY_DIM_OBJ                         0          ~11, 'temizle'
          5      > JMPZ                                                     ~12, ->8
    5     6    >   INIT_FCALL                                               'session_unset'
          7        DO_ICALL                                                 
    7     8    >   FETCH_IS                                         ~14     '_GET'
          9        ISSET_ISEMPTY_DIM_OBJ                         0  ~15     ~14, 'sat'
         10      > JMPZ_EX                                          ~15     ~15, ->14
         11    >   FETCH_IS                                         ~16     '_GET'
         12        ISSET_ISEMPTY_DIM_OBJ                         0  ~17     ~16, 'sat'
         13        BOOL                                             ~15     ~17
         14    > > JMPZ                                                     ~15, ->67
    8    15    >   INIT_FCALL                                               'rand'
         16        SEND_VAL                                                 0
         17        COUNT                                            ~18     !0
         18        SUB                                              ~19     ~18, 1
         19        SEND_VAL                                                 ~19
         20        DO_ICALL                                         $20     
         21        FETCH_DIM_R                                      ~21     !0, $20
         22        ASSIGN                                                   !1, ~21
    9    23        FETCH_R                      global              ~25     '_GET'
         24        FETCH_DIM_R                                      ~26     ~25, 'sat'
         25        FETCH_R                      global              ~28     '_GET'
         26        FETCH_DIM_R                                      ~29     ~28, 'sut'
         27        FETCH_W                      global              $23     '_SESSION'
         28        FETCH_DIM_W                                      $24     $23, 'tablo'
         29        FETCH_DIM_W                                      $27     $24, ~26
         30        ASSIGN_DIM                                               $27, ~29
         31        OP_DATA                                                  !1
   10    32        ASSIGN                                                   !2, 0
   11    33        ASSIGN                                                   !3, 0
   12    34        ASSIGN                                                   !4, 0
         35      > JMP                                                      ->55
   13    36    >   FETCH_R                      global              ~37     '_GET'
         37        FETCH_DIM_R                                      ~38     ~37, 'sut'
         38        FETCH_R                      global              ~34     '_SESSION'
         39        FETCH_DIM_R                                      ~35     ~34, 'tablo'
         40        FETCH_DIM_R                                      ~36     ~35, !4
         41        FETCH_DIM_R                                      ~39     ~36, ~38
         42        IS_EQUAL                                                 !1, ~39
         43      > JMPZ                                                     ~40, ->45
   14    44    >   PRE_INC                                                  !2
   16    45    >   FETCH_R                      global              ~44     '_GET'
         46        FETCH_DIM_R                                      ~45     ~44, 'sat'
         47        FETCH_R                      global              ~42     '_SESSION'
         48        FETCH_DIM_R                                      ~43     ~42, 'tablo'
         49        FETCH_DIM_R                                      ~46     ~43, ~45
         50        FETCH_DIM_R                                      ~47     ~46, !4
         51        IS_EQUAL                                                 !1, ~47
         52      > JMPZ                                                     ~48, ->54
   17    53    >   PRE_INC                                                  !3
   12    54    >   PRE_INC                                                  !4
         55    >   IS_SMALLER_OR_EQUAL                                      !4, 10
         56      > JMPNZ                                                    ~51, ->36
   20    57    >   IS_SMALLER_OR_EQUAL                              ~52     3, !3
         58      > JMPNZ_EX                                         ~52     ~52, ->61
         59    >   IS_SMALLER_OR_EQUAL                              ~53     3, !2
         60        BOOL                                             ~52     ~53
         61    > > JMPZ                                                     ~52, ->67
   21    62    >   INIT_FCALL                                               'session_unset'
         63        DO_ICALL                                                 
   22    64        INIT_FCALL                                               'header'
         65        SEND_VAL                                                 'location%3Aindex.php'
         66        DO_ICALL                                                 
   25    67    >   FETCH_IS                                         ~56     '_GET'
         68        ISSET_ISEMPTY_DIM_OBJ                         0  ~57     ~56, 'sat'
         69        BOOL_NOT                                         ~58     ~57
         70      > JMPZ                                                     ~58, ->87
   26    71    >   ASSIGN                                                   !5, 0
         72      > JMP                                                      ->82
   27    73    >   ASSIGN                                                   !6, 0
         74      > JMP                                                      ->79
   28    75    >   FETCH_DIM_W                                      $61     !7, !5
         76        ASSIGN_DIM                                               $61, !6
         77        OP_DATA                                                  1
   27    78        PRE_INC                                                  !6
         79    >   IS_SMALLER_OR_EQUAL                                      !6, 10
         80      > JMPNZ                                                    ~64, ->75
   26    81    >   PRE_INC                                                  !5
         82    >   IS_SMALLER_OR_EQUAL                                      !5, 10
         83      > JMPNZ                                                    ~66, ->73
   31    84    >   FETCH_W                      global              $67     '_SESSION'
         85        ASSIGN_DIM                                               $67, 'tablo'
         86        OP_DATA                                                  !7
   33    87    >   FETCH_R                      global              ~69     '_SESSION'
         88        FETCH_DIM_R                                      ~70     ~69, 'tablo'
         89        ASSIGN                                                   !7, ~70
   34    90        ECHO                                                     '%3Ctable+border%3D%272%27%3E'
   35    91        ASSIGN                                                   !4, 0
         92      > JMP                                                      ->117
   36    93    >   ECHO                                                     '%3Ctr%3E'
   37    94        ASSIGN                                                   !8, 0
         95      > JMP                                                      ->113
   38    96    >   FETCH_DIM_R                                      ~74     !7, !4
         97        FETCH_DIM_R                                      ~75     ~74, !8
         98        IS_EQUAL                                                 ~75, 1
         99      > JMPZ                                                     ~76, ->107
   39   100    >   ROPE_INIT                                     5  ~78     '%3Ctd%3E%3Ca+href%3D%27%3Fsat%3D'
        101        ROPE_ADD                                      1  ~78     ~78, !4
        102        ROPE_ADD                                      2  ~78     ~78, '%26sut%3D'
        103        ROPE_ADD                                      3  ~78     ~78, !8
        104        ROPE_END                                      4  ~77     ~78, '%27%3ET%C4%B1kla%3C%2Fa%3E%3C%2Ftd%3E'
        105        ECHO                                                     ~77
        106      > JMP                                                      ->112
   42   107    >   FETCH_DIM_R                                      ~81     !7, !4
        108        FETCH_DIM_R                                      ~82     ~81, !8
        109        CONCAT                                           ~83     '%3Ctd%3E', ~82
        110        CONCAT                                           ~84     ~83, '%3C%2Ftd%3E'
        111        ECHO                                                     ~84
   37   112    >   PRE_INC                                                  !8
        113    >   IS_SMALLER_OR_EQUAL                                      !8, 10
        114      > JMPNZ                                                    ~86, ->96
   45   115    >   ECHO                                                     '%3C%2Ftr%3E'
   35   116        PRE_INC                                                  !4
        117    >   IS_SMALLER_OR_EQUAL                                      !4, 10
        118      > JMPNZ                                                    ~88, ->93
   47   119    >   ECHO                                                     '%3C%2Ftable%3E'
   48   120        ECHO                                                     '%3Ca+href%3D%27%3Ftemizle%3D1%27%3Etemizle%3C%2Fa%3E'
   50   121        ECHO                                                     '-+See+more+at%3A+http%3A%2F%2Fwww.seyfettinkahveci.com%2F225-PHP-Dersleri-27-PHP-ile-SOS-Oyunu-Yapimi-%23sthash.ekoV6Rw9.dpuf'
        122      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.35 ms | 1408 KiB | 21 Q