3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Parse error: syntax error, unexpected token "endforeach", expecting end of file in /in/EFge2 on line 57
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Parse error: syntax error, unexpected token "endforeach", expecting end of file in /in/EFge2 on line 57
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33, 8.0.13
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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting end of file in /in/EFge2 on line 57
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH) in /in/EFge2 on line 57
Process exited with code 255.

preferences:
271.38 ms | 402 KiB | 329 Q