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); echo $d;
Output for 4.3.0 - 7.1.0
.CodeMirror{\nline-height:1em;\nfont-family:monospace}\n.CodeMirror-scroll{\noverflow:auto;\nheight:300px;\nposition:relative;\noutline:none}\n.CodeMirror-gutter{\nposition:absolute;\nleft:0;\ntop:0;\nz-index:10;\nbackground-color:#f7f7f7;\nborder-right:1px solid #eee;\nmin-width:2em;\nheight:100%}\n.CodeMirror-gutter-text{\ncolor:#aaa;\ntext-align:right;\npadding:.4em .2em .4em .4em;\nwhite-space:pre!important}\n.CodeMirror-lines{\npadding:.4em;\nwhite-space:pre}\n.CodeMirror pre{\n-moz-border-radius:0;\n-webkit-border-radius:0;\n-o-border-radius:0;\n-webkit-border-radius:0;\n-moz-border-radius:0;\n-o-border-radius:0;\n-html-border-radius:0;\nborder-radius:0;\nborder-width:0;\nmargin:0;\npadding:0;\nbackground:transparent;\nfont-family:inherit;\nfont-size:inherit;\npadding:0;\nmargin:0;\nwhite-space:pre;\nword-wrap:normal}\n.CodeMirror-wrap pre{\nword-wrap:break-word;\nwhite-space:pre-wrap}\n.CodeMirror-wrap .CodeMirror-scroll{\noverflow-x:hidden}\n.CodeMirror textarea{\noutline:none!important}\n.CodeMirror pre.CodeMirror-cursor{\nz-index:10;\nposition:absolute;\nvisibility:hidden;\nborder-left:1px solid black;\nborder-right:none;\nwidth:0}\n.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite{\n}\n.CodeMirror-focused pre.CodeMirror-cursor{\nvisibility:visible}\ndiv.CodeMirror-selected{\nbackground:#d9d9d9}\n.CodeMirror-focused div.CodeMirror-selected{\nbackground:#d7d4f0}\n.CodeMirror-searching{\nbackground:#ffa;\nbackground:rgba(255,255,0,.4)}\n.cm-s-default span.cm-keyword{\ncolor:#708}\n.cm-s-default span.cm-atom{\ncolor:#219}\n.cm-s-default span.cm-number{\ncolor:#164}\n.cm-s-default span.cm-def{\ncolor:#00f}\n.cm-s-default span.cm-variable{\ncolor:black}\n.cm-s-default span.cm-variable-2{\ncolor:#05a}\n.cm-s-default span.cm-variable-3{\ncolor:#085}\n.cm-s-default span.cm-property{\ncolor:black}\n.cm-s-default span.cm-operator{\ncolor:black}\n.cm-s-default span.cm-comment{\ncolor:#a50}\n.cm-s-default span.cm-string{\ncolor:#a11}\n.cm-s-default span.cm-string-2{\ncolor:#f50}\n.cm-s-default span.cm-meta{\ncolor:#555}\n.cm-s-default span.cm-error{\ncolor:#f00}\n.cm-s-default span.cm-qualifier{\ncolor:#555}\n.cm-s-default span.cm-builtin{\ncolor:#30a}\n.cm-s-default span.cm-bracket{\ncolor:#cc7}\n.cm-s-default span.cm-tag{\ncolor:#170}\n.cm-s-default span.cm-attribute{\ncolor:#00c}\n.cm-s-default span.cm-header{\ncolor:#a0a}\n.cm-s-default span.cm-quote{\ncolor:#090}\n.cm-s-default span.cm-hr{\ncolor:#999}\n.cm-s-default span.cm-link{\ncolor:#00c}\nspan.cm-header,span.cm-strong{\nfont-weight:bold}\nspan.cm-em{\nfont-style:italic}\nspan.cm-emstrong{\nfont-style:italic;\nfont-weight:bold}\nspan.cm-link{\ntext-decoration:underline}\ndiv.CodeMirror span.CodeMirror-matchingbracket{\ncolor:#0f0}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket{\ncolor:#f22}\ntextarea,.CodeMirror{\noverflow-x:auto;\nborder:0 solid black;\nborder-width:1px 0;\nwidth:100%}\n.CodeMirror{\nbackground:#fff;\nclear:both}\n.CodeMirror-scroll{\nheight:auto;\noverflow-y:hidden;\noverflow-x:auto;\nwidth:100%}\nbody{\nmargin:2em;\nfont-family:"Helvetica Neue",Helvetica,Arial,sans-serif;\ncolor:#333;\nfont-size:13px}\nform{\npadding:2em;\nbackground:#f5f5f5;\nmargin-bottom:1em;\n-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);\n-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);\n-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);\n-html-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);\nbox-shadow:inset 1px 1px 1px rgba(0,0,0,0.1)}\nform a{\nfloat:right}\nform,dd{\n-webkit-border-radius:0.5em;\n-moz-border-radius:0.5em;\n-o-border-radius:0.5em;\n-html-border-radius:0.5em;\nborder-radius:0.5em}\nul#tabs{\nmargin-bottom:-1px;\npadding-left:0;\nclear:both;\noverflow:hidden}\nul#tabs li{\nfloat:left;\nlist-style:none}\nul#tabs li+li{\nmargin-left:0.5em}\nul#tabs li a{\n-webkit-border-radius:4px 4px 0 0;\n-moz-border-radius:4px 4px 0 0;\n-o-border-radius:4px 4px 0 0;\n-html-border-radius:4px 4px 0 0;\nborder-radius:4px 4px 0 0;\ndisplay:block;\ncolor:#08c;\ntext-decoration:none;\npadding:8px 12px}\nul#tabs li:not(.active) a:hover{\nbackground:#ddd;\nborder-bottom:1px solid #ddd}\nul#tabs li.active{\nborder-bottom-color:white}\nul#tabs li.active a{\ncolor:#555;\nborder:1px solid #ddd;\nborder-bottom-color:white;\ncursor:default}\nul+div{\noverflow:hidden;\nmargin:0;\npadding:1.5em 2em;\nborder:1px solid #ddd}\nh1{\ncursor:pointer;\nmargin-top:0}\nsmall{\ncolor:#999}\ndl{\nmargin:0}\ndt{\nfont-size:20px;\ncursor:pointer}\ndd{\nmargin:1em 0 1.5em 0;\npadding:1em;\nbackground:#f9f9f9;\nborder:1px solid #ddd;\nmax-height:3.75em;\noverflow:auto;\nfont-family:monospace;\nwhite-space:pre;\n-webkit-transition:max-height 0.3s ease-out}\ndt:target+dd{\n-webkit-box-shadow:0 0 30px #ffe958;\n-moz-box-shadow:0 0 30px #ffe958;\n-o-box-shadow:0 0 30px #ffe958;\n-html-box-shadow:0 0 30px #ffe958;\nbox-shadow:0 0 30px #ffe958}\ndt:target:before{\ncontent:'BB0'}\ndd:hover,dt:target+dd{\nmax-height:50em;\n-webkit-transition:max-height 0.3s ease-in}\n.perf #chart,.perf #data{\nwidth:800px;\nheight:450px}\n.rel td>div{\nwidth:375px;\nheight:200px}\ntable{\nwidth:800px;\nborder-collapse:collapse;\nborder-spacing:0}\ntable td{\ntext-align:right;\npadding:4px;\nborder-top:1px solid #ddd}\ninput{\nbackground-color:#0074CC;\nbackground-image:-webkit-linear-gradient(top,#08C,#05C);\nbackground-image:-moz-linear-gradient(top,#08C,#05C);\nbackground-image:linear-gradient(top,#08C,#05C);\nbackground-repeat:repeat-x;\nborder:1px solid #CCC;\nborder-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);\ntext-shadow:0 -1px 0 rgba(0,0,0,0.25);\n-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);\n-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);\n-o-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);\n-html-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);\nbox-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);\ncolor:white;\npadding:9px 14px;\n-webkit-border-radius:5px;\n-moz-border-radius:5px;\n-o-border-radius:5px;\n-html-border-radius:5px;\nborder-radius:5px;\nfont-size:15px;\nmargin-left:0;\n-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;\n-moz-transition:border linear 0.2s,box-shadow linear 0.2s;\ncursor:pointer;\nmargin-top:1em}\ninput.busy{\ncursor:progress;\nbackground-image:url(/s/load.gif),linear-gradient(top,#08C,#05C);\nbackground-image:url(/s/load.gif),-webkit-linear-gradient(top,#08C,#05C);\nbackground-image:url(/s/load.gif),-moz-linear-gradient(top,#08C,#05C);\nbackground-repeat:no-repeat,repeat-x;\nbackground-position:62px center,left top;\npadding:9px 25px 9px 14px}\nbody > a{\nposition:fixed;\nbottom:0;\nleft:1px;\nfont-size:12px;\nbackground:white}\n.alert{\nposition:absolute;\nright:20px;\ntop:20px;\npadding:20px;\nbackground:#f5f5f5;\n-webkit-box-shadow:0 0 30px #0074CC;\n-moz-box-shadow:0 0 30px #0074CC;\n-o-box-shadow:0 0 30px #0074CC;\n-html-box-shadow:0 0 30px #0074CC;\nbox-shadow:0 0 30px #0074CC}\n.abusive{\nbackground:#c66;\n-webkit-box-shadow:0 0 30px red;\n-moz-box-shadow:0 0 30px red;\n-o-box-shadow:0 0 30px red;\n-html-box-shadow:0 0 30px red;\nbox-shadow:0 0 30px red}\n