3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tableUniqueIds = [900845, 2381036, 2636066, 3879196, 5031833]; foreach ($tableUniqueIds as $tableUniqueId) { $sqlStatements[] = " UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = $tableUniqueId"; $sqlStatements[] = " INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( $tableUniqueId, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' );"; } $sql = '```SQL' . implode('', $sqlStatements); $sql .= '```'; echo $sql;
Output for git.master_jit, git.master
```SQL UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = 900845 INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( 900845, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' ); UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = 2381036 INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( 2381036, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' ); UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = 2636066 INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( 2636066, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' ); UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = 3879196 INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( 3879196, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' ); UPDATE rbs_customer_payment_details cd SET cd.status_id = (SELECT cds.id FROM rbs_customer_payment_detail_statuses cds WHERE cds.status='rejected'), cd.updated_at = now() WHERE cd.id = 5031833 INSERT INTO rbs_customer_payment_detail_activities (customer_payment_detail_id, status_id, username, created_at, updated_at, reason) VALUES ( 5031833, (SELECT cds.id from rbs_customer_payment_detail_statuses cds where cds.status = 'rejected'), 'SYSTEM', now(), now(), 'Other: FUNDING-24509' );```

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.84 ms | 957 KiB | 4 Q