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.5.30.0120.00620.79
8.5.20.0130.00419.64
8.5.10.0110.00816.73
8.5.00.0090.01420.05
8.4.180.0140.00819.57
8.4.170.0120.00923.89
8.4.160.0140.01323.95
8.4.150.0070.00516.86
8.4.140.0070.01317.58
8.4.130.0040.00517.76
8.4.120.0110.00923.80
8.4.110.0070.00219.00
8.4.100.0080.01317.80
8.4.90.0120.00820.74
8.4.80.0040.00418.98
8.4.70.0080.01118.96
8.4.60.0070.01020.78
8.4.50.0050.00320.76
8.4.40.0150.00619.29
8.4.30.0120.00617.36
8.4.20.0100.00019.27
8.4.10.0110.00819.38
8.3.300.0100.01020.95
8.3.290.0100.01118.62
8.3.280.0150.00518.54
8.3.270.0110.00816.63
8.3.260.0080.01116.45
8.3.250.0130.00618.95
8.3.240.0050.00416.48
8.3.230.0060.00416.81
8.3.220.0050.00419.01
8.3.210.0100.00916.41
8.3.200.0070.00316.84
8.3.190.0070.00317.21
8.3.180.0120.00718.67
8.3.170.0090.00917.13
8.3.160.0130.00416.86
8.3.150.0100.00716.73
8.3.140.0040.00416.80
8.3.130.0080.00016.50
8.3.120.0090.00018.81
8.3.110.0140.00420.94
8.3.100.0080.00824.06
8.3.90.0050.00326.77
8.3.80.0040.00416.75
8.3.70.0120.00618.30
8.3.60.0130.00618.30
8.3.50.0130.00717.39
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.300.0110.00917.94
8.2.290.0050.00417.30
8.2.280.0150.00718.12
8.2.270.0140.00416.31
8.2.260.0050.00317.07
8.2.250.0080.00018.20
8.2.240.0030.00618.99
8.2.230.0030.00522.58
8.2.220.0000.00837.54
8.2.210.0080.00026.77
8.2.200.0030.00716.50
8.2.190.0070.00716.58
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.340.0140.00717.54
8.1.330.0140.00616.37
8.1.320.0090.00818.13
8.1.310.0100.00716.81
8.1.300.0150.00015.68
8.1.290.0030.00618.88
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:
57.05 ms | 1433 KiB | 5 Q