3v4l.org

run code in 300+ PHP versions simultaneously
<?php $alfabeto = array ('a', 'b'); $estados = array ('q0', 'q1', 'q2', 'q3'); $estInicial = 'q0'; $estadosFinales = array ('q3'); $fTransicion = array(); $fTransicion['q0']['a'] = array ('q0', 'q1'); $fTransicion['q0']['b'] = array ('q0'); $fTransicion['q1']['a'] = array (); $fTransicion['q1']['b'] = array ('q2'); $fTransicion['q2']['a'] = array ('q3'); $fTransicion['q2']['b'] = array (); $fTransicion['q3']['a'] = array ('q3'); $fTransicion['q3']['b'] = array ('q3'); $palabra='aba'; function Evaluar($_palabra,$_fTransicion,$_alfabeto,$_estados){ for ($i=0; $i < count($_estados) ; $i++) { for ($j=0; $j <count($_alfabeto) ; $j++) { echo $_fTransicion[i][j]; } echo ('/n'); } } Evaluar($palabra,$fTransicion,$alfabeto,$estados); ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Undefined constant "i" in /in/pGIoq:30 Stack trace: #0 /in/pGIoq(36): Evaluar('aba', Array, Array, Array) #1 {main} thrown in /in/pGIoq on line 30
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Trying to access array offset on value of type null in /in/pGIoq on line 30 /n
Output for 7.3.32 - 7.3.33
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 /n
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Warning: Use of undefined constant j - assumed 'j' (this will throw an Error in a future version of PHP) in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 Notice: Use of undefined constant i - assumed 'i' in /in/pGIoq on line 30 Notice: Use of undefined constant j - assumed 'j' in /in/pGIoq on line 30 Notice: Undefined index: i in /in/pGIoq on line 30 /n

preferences:
287.59 ms | 406 KiB | 369 Q