3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $this->set('lang', $this->i18n->getLocale()); $projectsToDelete = $totalProjects - $allowedProjects; $lang = $this->get('lang'); ?> <div id="projects-to-delete" class="reports-list"> <div class="user-project-list"> <div class="reports-list-title-container"> <h2 class="reports-list-title"><?= $this->i18n->_('overview_title_delete_projects')?></h2> <span class="label label-primary reports-list-remaining pull-right"> <?= $this->i18n->_( 'overview_delete_projects_counter', '', "<span class='js-to-delete'>$projectsToDelete</span>" );?> </span> </div> <? foreach ($pdata as $project) : $id = $project['id']; $reportId = $project['reportId']; $domain = $project['url']; $ok = isset($project['doneTasks']) ? $project['doneTasks'] : 0; $total = isset($project['totalTasks']) ? $project['totalTasks'] : 0; $score = round($project['score']); $date = $project['reportEnded']; ?> <div class="project-item" id="project-delete-<?= $id ?>"> <div class="entry"> <div class="row"> <div class="col-xs-1 dropdown options-container"> <button data-target="#delete-pj-modal" data-toggle="modal" data-origin="#project-<?= $id ?>,#project-delete-<?=$id?>" data-ajax="1" for="/<?= $lang ?>/unstar/<?= $id ?>/<?= $domain ?>" class="btn btn-circle btn-default delete-project"> <svg class="icon icon-minus fill-grey"> <use xlink:href="#minus"></use> </svg> </button> </div> <div class="col-xs-11 col-sm-7 score-container"> <span class="domain domain-without-score"><?= $domain ?></span> <span class="date date-without-score js-format-time" data-datetime="<?= $date ?>"></span> </div> </div> </div> </div> <?php endforeach; ?> </div> </div>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/EFge2:2 Stack trace: #0 {main} thrown in /in/EFge2 on line 2
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Using $this when not in object context in /in/EFge2 on line 2
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_ENDFOREACH in /in/EFge2 on line 57
Process exited with code 255.