3v4l.org

run code in 300+ PHP versions simultaneously
<?php class thisClass { public $files = array('a č o.png','a č o.png','a č o.png'); } $this = new thisClass; define('URL', '127.0.0.1/'); foreach($this->$files as $key => $value){ echo '<a href="' . URL . 'file/show/' . rawurlencode($this->$files[$key]) . '" target="_blank"> Show file </a>' . "\n"; //gives link leading to: 127.0.0.1/file%2Fshow%2Fa č o.png $address = rawurlencode($filename); echo '<a href="' . URL . 'file/show/' . $this->$files[$key] . '" target="_blank"> Show file </a>'; //gives link leading to: 127.0.0.1/file/show/a č o.png } ?>
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Fatal error: Cannot re-assign $this in /in/DScF6 on line 5
Process exited with code 255.

preferences:
150.81 ms | 1395 KiB | 22 Q