3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = array( array( 'id' => 1, 'first_name' => 'Peter', 'last_name' => 'Griffin', ), array( 'id' => 14, 'first_name' => 'Ben', 'last_name' => 'Smith', ), array( 'id' => 3, 'first_name' => 'Joe', 'last_name' => 'Doe', ) ); $ids = array_column($users, 'id'); //add_action('um_before_profile_fields', 'trigger_new_notification', 100); // Not sure what this does function trigger_new_notification( $args , $ids ) { global $um_notifications; /*$vars = array( "post_title" => get_post_field( 'post_title', $project_id ), "photo" => um_get_avatar_url( get_avatar( get_current_user_id(), 40 ) ), "member" => um_user('display_name'), "notification_uri" => cpm_url_project_details( $project_id ) );*/ foreach($ids as $row){ //$um_notifications->api->store_notification( $row, 'new_action', $vars ); echo $row . " "; } } //do_action( 'um_before_profile_fields'); // what does this do? // Dont know what $args is suppsed to be, just made a dummy. $args = ["something", "else"]; // Here I call the function and pass $args and $ids. trigger_new_notification( $args , $ids );

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0130.00618.30
8.3.50.0120.00918.21
8.3.40.0070.00718.64
8.3.30.0120.00318.57
8.3.20.0000.00823.70
8.3.10.0040.00421.79
8.3.00.0040.00421.95
8.2.180.0090.00625.92
8.2.170.0070.00722.96
8.2.160.0030.01018.91
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0040.00419.29
8.2.120.0040.00426.35
8.2.110.0100.00719.16
8.2.100.0070.00417.84
8.2.90.0000.00918.99
8.2.80.0000.00818.04
8.2.70.0050.00519.35
8.2.60.0050.00318.04
8.2.50.0080.00018.16
8.2.40.0000.00920.41
8.2.30.0020.00519.15
8.2.20.0040.00417.98
8.2.10.0050.00218.02
8.2.00.0000.00718.38
8.1.280.0110.00425.92
8.1.270.0140.00322.09
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00720.93
8.1.230.0040.00822.10
8.1.220.0040.00417.93
8.1.210.0040.00418.77
8.1.200.0090.00017.25
8.1.190.0060.00317.00
8.1.180.0040.00418.10
8.1.170.0090.00018.49
8.1.160.0080.00018.86
8.1.150.0040.00418.95
8.1.140.0000.00819.00
8.1.130.0000.00717.70
8.1.120.0030.00517.47
8.1.110.0080.00017.52
8.1.100.0040.00417.36
8.1.90.0000.00817.34
8.1.80.0040.00417.45
8.1.70.0040.00417.51
8.1.60.0070.00317.58
8.1.50.0040.00417.55
8.1.40.0000.00717.48
8.1.30.0040.00417.71
8.1.20.0080.00017.60
8.1.10.0040.00417.55
8.1.00.0060.00317.47
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0030.00317.23
8.0.260.0070.00017.14
8.0.250.0000.00717.00
8.0.240.0040.00416.95
8.0.230.0030.00316.92
8.0.220.0000.00716.83
8.0.210.0060.00016.89
8.0.200.0030.00316.89
8.0.190.0000.00716.98
8.0.180.0040.00417.01
8.0.170.0070.00316.91
8.0.160.0070.00016.80
8.0.150.0050.00616.84
8.0.140.0060.00316.75
8.0.130.0030.00313.25
8.0.120.0040.00416.88
8.0.110.0000.00716.94
8.0.100.0000.00816.73
8.0.90.0000.00716.86
8.0.80.0100.01016.93
8.0.70.0000.00816.92
8.0.60.0030.00516.74
8.0.50.0040.00416.96
8.0.30.0110.00917.12
8.0.20.0090.01117.40
8.0.10.0000.00716.89
8.0.00.0090.00916.74
7.4.330.0020.00215.55
7.4.320.0030.00316.62
7.4.300.0000.00916.64
7.4.290.0000.00716.60
7.4.280.0000.00816.40
7.4.270.0070.00016.55
7.4.260.0030.00316.64
7.4.250.0030.00316.43
7.4.240.0040.00416.59
7.4.230.0030.00316.35
7.4.220.0040.00416.62
7.4.210.0120.00716.57
7.4.200.0080.00016.38
7.4.160.0060.01016.44
7.4.150.0080.01317.40
7.4.140.0090.00917.86
7.4.130.0110.00716.47
7.4.120.0130.00916.65
7.4.110.0210.00316.49
7.4.100.0110.00716.41
7.4.90.0140.00416.59
7.4.80.0090.00919.39
7.4.70.0100.00716.53
7.4.60.0070.01016.40
7.4.50.0070.00716.59
7.4.40.0040.01216.62
7.4.00.0080.00815.06
7.3.330.0000.00513.24
7.3.320.0030.00313.26
7.3.310.0040.00416.27
7.3.300.0060.00016.20
7.3.290.0000.00816.13
7.3.280.0110.00616.32
7.3.270.0120.00917.40
7.3.260.0130.00716.47
7.3.250.0070.01216.34
7.3.240.0110.00816.37
7.3.230.0100.00716.36
7.3.210.0090.00616.29
7.3.200.0060.01216.44
7.3.190.0140.00316.35
7.3.180.0060.01716.60
7.3.170.0160.00316.31
7.3.160.0100.00716.41
7.3.10.0100.01015.76
7.3.00.0190.00516.43
7.2.330.0070.01016.74
7.2.320.0120.00516.52
7.2.310.0060.00916.60
7.2.300.0070.01516.39
7.2.290.0110.00616.54
7.2.130.0150.00916.83
7.2.120.0100.01316.49
7.2.110.0160.01116.79
7.2.100.0120.00916.22
7.2.90.0090.00916.77
7.2.80.0180.00816.77
7.2.70.0250.00616.53
7.2.60.0110.00616.86
7.2.50.0150.00316.46
7.2.40.0100.01016.60
7.2.30.0090.01016.28
7.2.20.0100.00716.71
7.2.10.0100.00718.09
7.2.00.0110.00618.23
7.1.250.0110.00615.24
7.1.200.0090.00015.89
7.1.120.0080.00818.36
7.1.110.0030.01318.36
7.1.100.0030.01118.12
7.1.90.0060.00918.02
7.1.80.0070.00717.97
7.1.70.0100.00317.28
7.1.60.0230.01334.77
7.1.50.0230.01034.91
7.1.40.0220.01634.14
7.1.30.0150.01634.52
7.1.20.0160.02034.68
7.1.10.0000.01516.57
7.1.00.0030.01716.77

preferences:
58.89 ms | 400 KiB | 5 Q