3v4l.org

run code in 300+ PHP versions simultaneously
<?php class enkripsi { private $kunci1=array('a','b','c','d','e','f','g','h','i','j','k','l','m'); protected $kunci2=array('n','o','p','q','r','s','t','u','v','w','x','y','z'); private function cari($a) { { if(in_array($a,$this->kunci1)) { $b=array_search($a,$this->kunci1); return $this->kunci2[$b]; } else {} } public in function cetak($a) { echo $this->cari($a); } } $ob=new enkripsi(); $ob->cetak("a"); } }
Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/3KOKI on line 17
Process exited with code 255.

preferences:
178.75 ms | 1395 KiB | 44 Q