3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $apiLogin = 'xbridge'; $userLogin = $_POST['user_name']; $userEmail = $_POST['user_email']; $apiKey = 'ddd'; $apiSignature = hash('sha256',$userLogin.$apiLogin.$apiKey); $query = array( 'apiLogin' => $apiLogin, 'apiSignature'=> $apiSignature, 'userLogin' => $userLogin, 'userEmail' => $userEmail, ); if(isset($_POST['user_first_name'])) { $query['userName'] = $_POST['user_first_name']; } if(isset($_POST['user_last_name'])) { $query['userLastName'] = $_POST['user_last_name']; } if(isset($_POST['user_phone'])) { $query['userPhone'] = $_POST['user_phone']; } $query['apiSignature'] = hash('sha256', $query['userLogin'].$query['apiLogin'].$apiKey); ?> <div class="contents1"> <div class="center1"> <?php if($result['status']=='success'){ $userInfo = json_decode($result['message'], true); $loginId = $userInfo['Login']; $pass = $userInfo['Password']; ?> <div class="text-success text-center"><h5><strong><br><br><br><br><br><br>登録成功しました。<br><br> ユーザ名:<?php echo $loginId;?><br><br> パスワード:<?php echo $pass;?><br></strong></h5></div> <br> <div class="margin-left380 col-lg-offset-4 col-lg-5"> <a class="btn btn-primary" href="mql4buy:">MT4へ</a> </div> <?php //send email $transport= Swift_SmtpTransport::newInstance("mail06.in-plus.jp", 587) ->setUsername('dev1@xbridge.co.jp') ->setPassword('Dev0824!'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('MQL5登録のお知らせ') ->setFrom(array('info@xbridge.co.jp'=>'xbridge')) ->setTo(array($query['userEmail']=>'お客様')) ->setBody('body') ->addPart('お客様へ:<br>MQL5登録成功しました。<br>お客様ID:'.$loginId.'<br>パスワード:'.$pass, 'text/html'); $result = $mailer->send($message); } else { $errorMessage = $result['message']; switch ($errorMessage) { case '[EmailExists]': $message = 'メールアドレスは既に使用されています。'; break; case '[InvalidParameters]': $message = '入力データが不正です。'; break; case '[LoginAlreadyExists]': $message = 'ユーザ名が既に使用されています。'; break; default: $message = 'システムエラー'; break; } ?> <div class='text-danger text-center'><h5><strong><br><br><br><br><br><br>登録失敗しました<br><br> エラー:<?php echo $message;?><br></strong></h5></div> <?php } ?> </div> </div> <br>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: user_name in /in/BQcEW on line 3 Notice: Undefined index: user_email in /in/BQcEW on line 4 <div class="contents1"> <div class="center1"> Notice: Undefined variable: result in /in/BQcEW on line 36 Notice: Undefined variable: result in /in/BQcEW on line 64 <div class='text-danger text-center'><h5><strong><br><br><br><br><br><br>登録失敗しました<br><br> エラー:システムエラー<br></strong></h5></div> </div> </div> <br>
Output for 5.1.2 - 5.2.17
Notice: Undefined index: user_name in /in/BQcEW on line 3 Notice: Undefined index: user_email in /in/BQcEW on line 4 <div class="contents1"> <div class="center1"> Notice: Undefined variable: result in /in/BQcEW on line 36 Notice: Undefined variable: result in /in/BQcEW on line 64 <div class='text-danger text-center'><h5><strong><br><br><br><br><br><br>登録失敗しました<br><br> エラー:システムエラー<br></strong></h5></div> </div> </div> <br>
Output for 5.0.0 - 5.1.1
Notice: Undefined index: user_name in /in/BQcEW on line 3 Notice: Undefined index: user_email in /in/BQcEW on line 4 Fatal error: Call to undefined function hash() in /in/BQcEW on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/BQcEW on line 52
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/BQcEW on line 52
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/BQcEW on line 52
Process exited with code 255.