3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); include '../koneksi/connect.php'; $selectprocessor = mysql_query("SELECT 'benchmark_processor' FROM `processor` "); $fuzzyprocessormax = mysql_query("SELECT 'max_batas_fuzzy' FROM `batas_fuzzy` WHERE 'nama_batas_fuzzy' = 'processor'"); $fuzzyprocessormin = mysql_query("SELECT 'min_batas_fuzzy' FROM `batas_fuzzy` WHERE 'nama_batas_fuzzy' = 'processor'"); $office_status = 'unchecked'; $game_status = 'unchecked'; if (isset($_POST['submit_kebutuhan_processor'])) { $selected_radio = $_POST['$kebutuhan_processor_status']; if ($selected_radio == 'office') { $office_status = 'checked'; while($row = mysql_fetch_array($selectprocessor)) { // Hitung fuzzy processor min if ($row <= $fuzzyprocessormin ) { mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '1'"); echo 'Kebutuhan fuzzy 1'; die(); header("Location: ../processor.html"); } else if ($fuzzyprocessormin <= $row or $row <= $fuzzyprocessormax ) { $rekomendasi = ($fuzzyprocessormax - $row ) / ($fuzzyprocessormax-$fuzzyprocessormin); mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '$rekomendasi'"); die(); header("Location: ../processor.html");} else if ($row >= $fuzzyprocessormax) { mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '0' "); } else echo header("Location: ../processor.html"); } } else if ($selected_radio == 'game') { $game_status = 'checked'; while($row = mysql_fetch_array($selectprocessor)) { // Hitung fuzzy processor max if ($row <= $fuzzyprocessormin) { mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '0' "); } else if ($fuzzyprocessormin <= $row OR $row <= $fuzzyhardiskmax) { $rekomendasi = ($row - $fuzzyprocessormin) / ($fuzzyprocessormax-$fuzzyprocessormin); mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '$rekomendasi' "); } else if ($row >= $fuzzyprocessormax) { mysql_query ( "UPDATE processor SET kebutuhan_fuzzy = '1' "); } else header("Location: ../processor.html"); } }} ?>
Output for 7.0.0 - 7.1.0
Warning: include(../koneksi/connect.php): failed to open stream: No such file or directory in /in/7Gqp4 on line 3 Warning: include(): Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/7Gqp4:5 Stack trace: #0 {main} thrown in /in/7Gqp4 on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: File not found: ../koneksi/connect.php in /in/7Gqp4 on line 3 Warning: supplied argument is not a valid MySQL-Link resource in /in/7Gqp4 on line 5 Warning: supplied argument is not a valid MySQL-Link resource in /in/7Gqp4 on line 6 Warning: supplied argument is not a valid MySQL-Link resource in /in/7Gqp4 on line 7
Output for 5.1.0 - 5.6.28
Warning: include(../koneksi/connect.php): failed to open stream: No such file or directory in /in/7Gqp4 on line 3 Warning: include(): Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Fatal error: Call to undefined function mysql_query() in /in/7Gqp4 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(../koneksi/connect.php): failed to open stream: No such file or directory in /in/7Gqp4 on line 3 Warning: main(): Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Fatal error: Call to undefined function mysql_query() in /in/7Gqp4 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: main(../koneksi/connect.php): failed to open stream: No such file or directory in /in/7Gqp4 on line 3 Warning: main(): Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 5 Warning: mysql_query(): A link to the server could not be established in /in/7Gqp4 on line 5 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 6 Warning: mysql_query(): A link to the server could not be established in /in/7Gqp4 on line 6 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 7 Warning: mysql_query(): A link to the server could not be established in /in/7Gqp4 on line 7
Output for 4.3.1
Warning: main(../koneksi/connect.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/7Gqp4 on line 3 Warning: main() [http://www.php.net/function.main]: Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/7Gqp4 on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 7
Output for 4.3.0
Warning: main(../koneksi/connect.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/7Gqp4 on line 3 Warning: main() [http://www.php.net/function.main]: Failed opening '../koneksi/connect.php' for inclusion (include_path='.:') in /in/7Gqp4 on line 3 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/7Gqp4 on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/7Gqp4 on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/7Gqp4 on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/7Gqp4 on line 7