3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $_SESSION = array('a' => 5, 'b' => 'a', 'c' => 55); var_dump($_SESSION); $str = session_encode(); var_dump($str); $str = str_replace('a', 'á', $str); var_dump($str); $_SESSION = array(); var_dump($_SESSION); session_decode($str); var_dump($_SESSION);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["a"]=> int(5) ["b"]=> string(1) "a" ["c"]=> int(55) } string(23) "a|i:5;b|s:1:"a";c|i:55;" string(25) "á|i:5;b|s:1:"á";c|i:55;" array(0) { } Warning: session_decode(): Failed to decode session object. Session has been destroyed in /in/holDO on line 11 array(0) { }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.99 ms | 402 KiB | 8 Q