3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $q1 = 1; $q2 = 2; $q3 = 3; $q4 = 4; $q5 = 5; echo "${q1}"; //outputs 1 for($i=1; $i<=5; $i++) { echo "${${i}}"; //how to make $i work here? }
Output for 7.2.0
1 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/d4IH6 on line 14 Notice: Undefined variable: 1 in /in/d4IH6 on line 14 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/d4IH6 on line 14 Notice: Undefined variable: 2 in /in/d4IH6 on line 14 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/d4IH6 on line 14 Notice: Undefined variable: 3 in /in/d4IH6 on line 14 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/d4IH6 on line 14 Notice: Undefined variable: 4 in /in/d4IH6 on line 14 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/d4IH6 on line 14 Notice: Undefined variable: 5 in /in/d4IH6 on line 14
Output for 5.0.4 - 7.1.10
1 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 1 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 2 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 3 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 4 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 5 in /in/d4IH6 on line 14
Output for 4.3.0 - 5.0.3
1 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 1 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 2 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 3 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 4 in /in/d4IH6 on line 14 Notice: Use of undefined constant i - assumed 'i' in /in/d4IH6 on line 14 Notice: Undefined variable: 5 in /in/d4IH6 on line 14