3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.3.0 - 8.3.6
Warning: Undefined array key "user_name" in /in/BQcEW on line 3 Warning: Undefined array key "user_email" in /in/BQcEW on line 4 <div class="contents1"> <div class="center1"> Warning: Undefined variable $result in /in/BQcEW on line 36 Warning: Trying to access array offset on null in /in/BQcEW on line 36 Warning: Undefined variable $result in /in/BQcEW on line 64 Warning: Trying to access array offset on null 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 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: Undefined array key "user_name" in /in/BQcEW on line 3 Warning: Undefined array key "user_email" in /in/BQcEW on line 4 <div class="contents1"> <div class="center1"> Warning: Undefined variable $result in /in/BQcEW on line 36 Warning: Trying to access array offset on value of type null in /in/BQcEW on line 36 Warning: Undefined variable $result in /in/BQcEW on line 64 Warning: Trying to access array offset on value of type null 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 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
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: Trying to access array offset on value of type null in /in/BQcEW on line 36 Notice: Undefined variable: result in /in/BQcEW on line 64 Notice: Trying to access array offset on value of type null 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 7.3.32 - 7.3.33, 7.4.26
<div class="contents1"> <div class="center1"> <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.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.17 - 7.2.33, 7.3.0 - 7.3.31
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.1.6, 5.2.0 - 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.0.5, 5.1.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.3.11, 4.4.0 - 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.

preferences:
290.32 ms | 401 KiB | 377 Q