3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = ".CodeMirror{line-height:1em;font-family:monospace}.CodeMirror-scroll{overflow:auto;height:300px;position:relative;outline:none}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre!important}.CodeMirror-lines{padding:.4em;white-space:pre}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-o-border-radius:0;-html-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:none!important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black;border-right:none;width:0}.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite{}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}div.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused div.CodeMirror-selected{background:#d7d4f0}.CodeMirror-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:black}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-property{color:black}.cm-s-default span.cm-operator{color:black}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:#f00}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:#a0a}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:bold}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:bold}span.cm-link{text-decoration:underline}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}textarea,.CodeMirror{overflow-x:auto;border:0 solid black;border-width:1px 0;width:100%}.CodeMirror{background:#fff;clear:both}.CodeMirror-scroll{height:auto;overflow-y:hidden;overflow-x:auto;width:100%}body{margin:2em;font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;color:#333;font-size:13px}form{padding:2em;background:#f5f5f5;margin-bottom:1em;-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);-html-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1)}form a{float:right}form,dd{-webkit-border-radius:0.5em;-moz-border-radius:0.5em;-o-border-radius:0.5em;-html-border-radius:0.5em;border-radius:0.5em}ul#tabs{margin-bottom:-1px;padding-left:0;clear:both;overflow:hidden}ul#tabs li{float:left;list-style:none}ul#tabs li+li{margin-left:0.5em}ul#tabs li a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;-html-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;display:block;color:#08c;text-decoration:none;padding:8px 12px}ul#tabs li:not(.active) a:hover{background:#ddd;border-bottom:1px solid #ddd}ul#tabs li.active{border-bottom-color:white}ul#tabs li.active a{color:#555;border:1px solid #ddd;border-bottom-color:white;cursor:default}ul+div{overflow:hidden;margin:0;padding:1.5em 2em;border:1px solid #ddd}h1{cursor:pointer;margin-top:0}small{color:#999}dl{margin:0}dt{font-size:20px;cursor:pointer}dd{margin:1em 0 1.5em 0;padding:1em;background:#f9f9f9;border:1px solid #ddd;max-height:3.75em;overflow:auto;font-family:monospace;white-space:pre;-webkit-transition:max-height 0.3s ease-out}dt:target+dd{-webkit-box-shadow:0 0 30px #ffe958;-moz-box-shadow:0 0 30px #ffe958;-o-box-shadow:0 0 30px #ffe958;-html-box-shadow:0 0 30px #ffe958;box-shadow:0 0 30px #ffe958}dt:target:before{content:'\00BB\0020'}dd:hover,dt:target+dd{max-height:50em;-webkit-transition:max-height 0.3s ease-in}.perf #chart,.perf #data{width:800px;height:450px}.rel td>div{width:375px;height:200px}table{width:800px;border-collapse:collapse;border-spacing:0}table td{text-align:right;padding:4px;border-top:1px solid #ddd}input{background-color:#0074CC;background-image:-webkit-linear-gradient(top,#08C,#05C);background-image:-moz-linear-gradient(top,#08C,#05C);background-image:linear-gradient(top,#08C,#05C);background-repeat:repeat-x;border:1px solid #CCC;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);text-shadow:0 -1px 0 rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-html-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);color:white;padding:9px 14px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;-html-border-radius:5px;border-radius:5px;font-size:15px;margin-left:0;-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;cursor:pointer;margin-top:1em}input.busy{cursor:progress;background-image:url(/s/load.gif),linear-gradient(top,#08C,#05C);background-image:url(/s/load.gif),-webkit-linear-gradient(top,#08C,#05C);background-image:url(/s/load.gif),-moz-linear-gradient(top,#08C,#05C);background-repeat:no-repeat,repeat-x;background-position:62px center,left top;padding:9px 25px 9px 14px}body > a{position:fixed;bottom:0;left:1px;font-size:12px;background:white}.alert{position:absolute;right:20px;top:20px;padding:20px;background:#f5f5f5;-webkit-box-shadow:0 0 30px #0074CC;-moz-box-shadow:0 0 30px #0074CC;-o-box-shadow:0 0 30px #0074CC;-html-box-shadow:0 0 30px #0074CC;box-shadow:0 0 30px #0074CC}.abusive{background:#c66;-webkit-box-shadow:0 0 30px red;-moz-box-shadow:0 0 30px red;-o-box-shadow:0 0 30px red;-html-box-shadow:0 0 30px red;box-shadow:0 0 30px red}"; $d = preg_replace('@(;|\}|{)@',"$1\n",$d); $d = preg_replace('@;?(?:\s\n*\}@',";\n}",$d); echo $d;
Output for 4.3.11 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Compilation failed: missing ) at offset 12 in /in/VNpWk on line 5
Output for 4.3.0 - 4.3.10, hhvm-3.10.0 - 3.12.0
Warning: Compilation failed: missing ) at offset 12 in /in/VNpWk on line 5