3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = array('code' => 'A0001', 'det1' => 'it something v1', 'det2' => 'numero uno'); $code = $_POST['code']; //A0001 $det1 = $_POST['det1']; //it something v1 $det2 = $_POST['det2']; //numero uno $stmt = array('al_code' => 'A0001', 'al_det_in' => 'it something', 'al_det_en' => 'numero uno'); $alcode = $stmt['al_code']; //A0001 $aldet1 = $stmt['al_det_in']; //it something $aldet2 = $stmt['al_det_en']; //numero uno $valA = 'A'; $valB = 'B'; $$valA = $code . $det1 . $det2; $$valB = $alcode . $aldet1 . $aldet2; echo $code ." $$ ". $det1 ." $$ ". $det2 ."$$". $$valA ." $$\n"; echo $alcode ." ## ". $aldet1 ." ## ". $aldet2 ." ## ". $$valB ." ##\n";
Output for 7.1.25 - 7.1.28, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.16, 8.5.0 - 8.5.1
A0001 $$ it something v1 $$ numero uno$$A0001it something v1numero uno $$ A0001 ## it something ## numero uno ## A0001it somethingnumero uno ##

preferences:
204.91 ms | 408 KiB | 5 Q